From c239e0cc3a28a50c42c63b086ee62e17cf699104 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Mon, 4 Feb 2019 20:06:58 -0600 Subject: Integrate into latest v4. --- .editorconfig | 37 + ComPlus.wixext.sln | 64 ++ appveyor.cmd | 16 + appveyor.yml | 42 + nuget.config | 16 + src/Cpp.Build.props | 106 ++ src/Directory.Build.props | 28 + src/Directory.Build.targets | 48 + src/FindLocalWix.props | 8 + src/Wix.Build.props | 31 + src/ca/complusca.def | 15 + src/ca/complusca.vcxproj | 99 ++ src/ca/cpappexec.cpp | 4 +- src/ca/cpappsched.cpp | 10 +- src/ca/cpasmexec.cpp | 133 ++- src/ca/cpasmsched.cpp | 82 +- src/ca/cpasmsched.h | 30 +- src/ca/cpexec.cpp | 43 +- src/ca/cpexec.def | 11 - src/ca/cppartexec.cpp | 4 +- src/ca/cppartsched.cpp | 12 +- src/ca/cpsched.cpp | 36 +- src/ca/cpsubssched.cpp | 6 +- src/ca/cpsubssched.h | 2 +- src/ca/cputilexec.cpp | 56 +- src/ca/cputilexec.h | 14 +- src/ca/cputilsched.cpp | 28 +- src/ca/cputilsched.h | 26 +- src/ca/custommsierrors.h | 29 + src/ca/dllmain.cpp | 27 + src/ca/packages.config | 5 + src/ca/precomp.h | 33 + .../ComPlusExtensionFixture.cs | 32 + .../UsingComPlusPartition/Package.en-us.wxl | 11 + .../TestData/UsingComPlusPartition/Package.wxs | 22 + .../UsingComPlusPartition/PackageComponents.wxs | 12 + .../TestData/UsingComPlusPartition/example.txt | 1 + .../WixToolsetTest.ComPlus.csproj | 38 + src/wixext/ComPlusCompiler.cs | 1079 ++++++++++---------- src/wixext/ComPlusDecompiler.cs | 4 +- src/wixext/ComPlusErrors.cs | 72 ++ src/wixext/ComPlusExtensionData.cs | 50 +- src/wixext/ComPlusExtensionFactory.cs | 18 + src/wixext/ComPlusWarnings.cs | 31 + ...omPlusWindowsInstallerBackendBinderExtension.cs | 26 + .../Tuples/ComPlusApplicationPropertyTuple.cs | 63 ++ .../Tuples/ComPlusApplicationRolePropertyTuple.cs | 63 ++ src/wixext/Tuples/ComPlusApplicationRoleTuple.cs | 71 ++ src/wixext/Tuples/ComPlusApplicationTuple.cs | 79 ++ .../Tuples/ComPlusAssemblyDependencyTuple.cs | 55 + src/wixext/Tuples/ComPlusAssemblyTuple.cs | 103 ++ src/wixext/Tuples/ComPlusComponentPropertyTuple.cs | 63 ++ src/wixext/Tuples/ComPlusComponentTuple.cs | 63 ++ .../Tuples/ComPlusGroupInApplicationRoleTuple.cs | 71 ++ .../Tuples/ComPlusGroupInPartitionRoleTuple.cs | 71 ++ src/wixext/Tuples/ComPlusInterfacePropertyTuple.cs | 63 ++ src/wixext/Tuples/ComPlusInterfaceTuple.cs | 63 ++ src/wixext/Tuples/ComPlusMethodPropertyTuple.cs | 63 ++ src/wixext/Tuples/ComPlusMethodTuple.cs | 71 ++ src/wixext/Tuples/ComPlusPartitionPropertyTuple.cs | 63 ++ src/wixext/Tuples/ComPlusPartitionRoleTuple.cs | 71 ++ src/wixext/Tuples/ComPlusPartitionTuple.cs | 71 ++ src/wixext/Tuples/ComPlusPartitionUserTuple.cs | 71 ++ src/wixext/Tuples/ComPlusRoleForComponentTuple.cs | 71 ++ src/wixext/Tuples/ComPlusRoleForInterfaceTuple.cs | 71 ++ src/wixext/Tuples/ComPlusRoleForMethodTuple.cs | 71 ++ .../Tuples/ComPlusSubscriptionPropertyTuple.cs | 63 ++ src/wixext/Tuples/ComPlusSubscriptionTuple.cs | 95 ++ src/wixext/Tuples/ComPlusTupleDefinitions.cs | 135 +++ .../Tuples/ComPlusUserInApplicationRoleTuple.cs | 71 ++ .../Tuples/ComPlusUserInPartitionRoleTuple.cs | 71 ++ src/wixext/WixComPlusExtension.csproj | 50 - src/wixext/WixToolset.ComPlus.wixext.csproj | 33 + src/wixext/WixToolset.ComPlus.wixext.targets | 11 + src/wixext/messages.xml | 77 -- src/wixlib/ComPlusExtension.wixproj | 26 - src/wixlib/ComPlusExtension.wxs | 58 +- src/wixlib/caerr.wxi | 96 ++ src/wixlib/complus.wixproj | 36 + src/wixlib/packages.config | 5 + version.json | 11 + 81 files changed, 3728 insertions(+), 1058 deletions(-) create mode 100644 .editorconfig create mode 100644 ComPlus.wixext.sln create mode 100644 appveyor.cmd create mode 100644 appveyor.yml create mode 100644 nuget.config create mode 100644 src/Cpp.Build.props create mode 100644 src/Directory.Build.props create mode 100644 src/Directory.Build.targets create mode 100644 src/FindLocalWix.props create mode 100644 src/Wix.Build.props create mode 100644 src/ca/complusca.def create mode 100644 src/ca/complusca.vcxproj delete mode 100644 src/ca/cpexec.def create mode 100644 src/ca/custommsierrors.h create mode 100644 src/ca/dllmain.cpp create mode 100644 src/ca/packages.config create mode 100644 src/ca/precomp.h create mode 100644 src/test/WixToolsetTest.ComPlus/ComPlusExtensionFixture.cs create mode 100644 src/test/WixToolsetTest.ComPlus/TestData/UsingComPlusPartition/Package.en-us.wxl create mode 100644 src/test/WixToolsetTest.ComPlus/TestData/UsingComPlusPartition/Package.wxs create mode 100644 src/test/WixToolsetTest.ComPlus/TestData/UsingComPlusPartition/PackageComponents.wxs create mode 100644 src/test/WixToolsetTest.ComPlus/TestData/UsingComPlusPartition/example.txt create mode 100644 src/test/WixToolsetTest.ComPlus/WixToolsetTest.ComPlus.csproj create mode 100644 src/wixext/ComPlusErrors.cs create mode 100644 src/wixext/ComPlusExtensionFactory.cs create mode 100644 src/wixext/ComPlusWarnings.cs create mode 100644 src/wixext/ComPlusWindowsInstallerBackendBinderExtension.cs create mode 100644 src/wixext/Tuples/ComPlusApplicationPropertyTuple.cs create mode 100644 src/wixext/Tuples/ComPlusApplicationRolePropertyTuple.cs create mode 100644 src/wixext/Tuples/ComPlusApplicationRoleTuple.cs create mode 100644 src/wixext/Tuples/ComPlusApplicationTuple.cs create mode 100644 src/wixext/Tuples/ComPlusAssemblyDependencyTuple.cs create mode 100644 src/wixext/Tuples/ComPlusAssemblyTuple.cs create mode 100644 src/wixext/Tuples/ComPlusComponentPropertyTuple.cs create mode 100644 src/wixext/Tuples/ComPlusComponentTuple.cs create mode 100644 src/wixext/Tuples/ComPlusGroupInApplicationRoleTuple.cs create mode 100644 src/wixext/Tuples/ComPlusGroupInPartitionRoleTuple.cs create mode 100644 src/wixext/Tuples/ComPlusInterfacePropertyTuple.cs create mode 100644 src/wixext/Tuples/ComPlusInterfaceTuple.cs create mode 100644 src/wixext/Tuples/ComPlusMethodPropertyTuple.cs create mode 100644 src/wixext/Tuples/ComPlusMethodTuple.cs create mode 100644 src/wixext/Tuples/ComPlusPartitionPropertyTuple.cs create mode 100644 src/wixext/Tuples/ComPlusPartitionRoleTuple.cs create mode 100644 src/wixext/Tuples/ComPlusPartitionTuple.cs create mode 100644 src/wixext/Tuples/ComPlusPartitionUserTuple.cs create mode 100644 src/wixext/Tuples/ComPlusRoleForComponentTuple.cs create mode 100644 src/wixext/Tuples/ComPlusRoleForInterfaceTuple.cs create mode 100644 src/wixext/Tuples/ComPlusRoleForMethodTuple.cs create mode 100644 src/wixext/Tuples/ComPlusSubscriptionPropertyTuple.cs create mode 100644 src/wixext/Tuples/ComPlusSubscriptionTuple.cs create mode 100644 src/wixext/Tuples/ComPlusTupleDefinitions.cs create mode 100644 src/wixext/Tuples/ComPlusUserInApplicationRoleTuple.cs create mode 100644 src/wixext/Tuples/ComPlusUserInPartitionRoleTuple.cs delete mode 100644 src/wixext/WixComPlusExtension.csproj create mode 100644 src/wixext/WixToolset.ComPlus.wixext.csproj create mode 100644 src/wixext/WixToolset.ComPlus.wixext.targets delete mode 100644 src/wixext/messages.xml delete mode 100644 src/wixlib/ComPlusExtension.wixproj create mode 100644 src/wixlib/caerr.wxi create mode 100644 src/wixlib/complus.wixproj create mode 100644 src/wixlib/packages.config create mode 100644 version.json diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000..1d72e683 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,37 @@ +# Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. +# +# Do NOT modify this file. Update the canonical version in Home\repo-template\src\.editorconfig +# then update all of the repos. + +root = true + +[*] +charset = utf-8 +indent_style = space +indent_size = 4 +trim_trailing_whitespace = true + +[*.{cs,vb}] +dotnet_sort_system_directives_first = true + +[*.cs] +csharp_indent_case_contents = true : error +csharp_indent_switch_labels = true : error +csharp_new_line_before_open_brace = all +csharp_prefer_braces = true : error +csharp_style_expression_bodied_methods = when_on_single_line : suggestion +csharp_style_expression_bodied_constructors = when_on_single_line : suggestion +csharp_style_expression_bodied_operators = when_on_single_line : suggestion +csharp_style_expression_bodied_properties = when_on_single_line : suggestion +csharp_style_expression_bodied_indexers = when_on_single_line : suggestion +csharp_style_expression_bodied_accessors = when_on_single_line : suggestion +csharp_style_var_elsewhere = true : suggestion +csharp_style_var_for_built_in_types = true : suggestion +csharp_style_var_when_type_is_apparent = true : suggestion +dotnet_style_qualification_for_event = true : error +dotnet_style_qualification_for_field = true : error +dotnet_style_qualification_for_method = true : error +dotnet_style_qualification_for_property = true : error + +[*.targets] +indent_size = 2 diff --git a/ComPlus.wixext.sln b/ComPlus.wixext.sln new file mode 100644 index 00000000..f117e399 --- /dev/null +++ b/ComPlus.wixext.sln @@ -0,0 +1,64 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.28010.2016 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "complusca", "src\ca\complusca.vcxproj", "{BDEF51ED-E242-4FA2-801A-01B127DF851A}" +EndProject +Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "complus", "src\wixlib\complus.wixproj", "{E191E61E-E098-4F71-888F-51A79F952022}" + ProjectSection(ProjectDependencies) = postProject + {BDEF51ED-E242-4FA2-801A-01B127DF851A} = {BDEF51ED-E242-4FA2-801A-01B127DF851A} + EndProjectSection +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolset.ComPlus.wixext", "src\wixext\WixToolset.ComPlus.wixext.csproj", "{1497B777-330B-4CFE-927A-22850CD24D64}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolsetTest.ComPlus", "src\test\WixToolsetTest.ComPlus\WixToolsetTest.ComPlus.csproj", "{2FC5F039-EACF-428B-BA87-8CDE1D25E121}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {BDEF51ED-E242-4FA2-801A-01B127DF851A}.Debug|Any CPU.ActiveCfg = Debug|Win32 + {BDEF51ED-E242-4FA2-801A-01B127DF851A}.Debug|Any CPU.Build.0 = Debug|Win32 + {BDEF51ED-E242-4FA2-801A-01B127DF851A}.Debug|x86.ActiveCfg = Debug|Win32 + {BDEF51ED-E242-4FA2-801A-01B127DF851A}.Debug|x86.Build.0 = Debug|Win32 + {BDEF51ED-E242-4FA2-801A-01B127DF851A}.Release|Any CPU.ActiveCfg = Release|Win32 + {BDEF51ED-E242-4FA2-801A-01B127DF851A}.Release|Any CPU.Build.0 = Release|Win32 + {BDEF51ED-E242-4FA2-801A-01B127DF851A}.Release|x86.ActiveCfg = Release|Win32 + {BDEF51ED-E242-4FA2-801A-01B127DF851A}.Release|x86.Build.0 = Release|Win32 + {E191E61E-E098-4F71-888F-51A79F952022}.Debug|Any CPU.ActiveCfg = Debug|x86 + {E191E61E-E098-4F71-888F-51A79F952022}.Debug|Any CPU.Build.0 = Debug|x86 + {E191E61E-E098-4F71-888F-51A79F952022}.Debug|x86.ActiveCfg = Debug|x86 + {E191E61E-E098-4F71-888F-51A79F952022}.Debug|x86.Build.0 = Debug|x86 + {E191E61E-E098-4F71-888F-51A79F952022}.Release|Any CPU.ActiveCfg = Release|x86 + {E191E61E-E098-4F71-888F-51A79F952022}.Release|Any CPU.Build.0 = Release|x86 + {E191E61E-E098-4F71-888F-51A79F952022}.Release|x86.ActiveCfg = Release|x86 + {E191E61E-E098-4F71-888F-51A79F952022}.Release|x86.Build.0 = Release|x86 + {1497B777-330B-4CFE-927A-22850CD24D64}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1497B777-330B-4CFE-927A-22850CD24D64}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1497B777-330B-4CFE-927A-22850CD24D64}.Debug|x86.ActiveCfg = Debug|Any CPU + {1497B777-330B-4CFE-927A-22850CD24D64}.Debug|x86.Build.0 = Debug|Any CPU + {1497B777-330B-4CFE-927A-22850CD24D64}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1497B777-330B-4CFE-927A-22850CD24D64}.Release|Any CPU.Build.0 = Release|Any CPU + {1497B777-330B-4CFE-927A-22850CD24D64}.Release|x86.ActiveCfg = Release|Any CPU + {1497B777-330B-4CFE-927A-22850CD24D64}.Release|x86.Build.0 = Release|Any CPU + {2FC5F039-EACF-428B-BA87-8CDE1D25E121}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2FC5F039-EACF-428B-BA87-8CDE1D25E121}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2FC5F039-EACF-428B-BA87-8CDE1D25E121}.Debug|x86.ActiveCfg = Debug|Any CPU + {2FC5F039-EACF-428B-BA87-8CDE1D25E121}.Debug|x86.Build.0 = Debug|Any CPU + {2FC5F039-EACF-428B-BA87-8CDE1D25E121}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2FC5F039-EACF-428B-BA87-8CDE1D25E121}.Release|Any CPU.Build.0 = Release|Any CPU + {2FC5F039-EACF-428B-BA87-8CDE1D25E121}.Release|x86.ActiveCfg = Release|Any CPU + {2FC5F039-EACF-428B-BA87-8CDE1D25E121}.Release|x86.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {3E1857C4-5EE1-4C9E-9390-9954E041546D} + EndGlobalSection +EndGlobal diff --git a/appveyor.cmd b/appveyor.cmd new file mode 100644 index 00000000..8a48fe2b --- /dev/null +++ b/appveyor.cmd @@ -0,0 +1,16 @@ +@setlocal +@pushd %~dp0 + +nuget restore + +msbuild -p:Configuration=Release -t:Restore + +msbuild -p:Configuration=Release -p:Platform=Win32 src\ca\complusca.vcxproj +msbuild -p:Configuration=Release -p:Platform=x64 src\ca\complusca.vcxproj + +msbuild -p:Configuration=Release src\test\WixToolsetTest.ComPlus\WixToolsetTest.ComPlus.csproj + +msbuild -p:Configuration=Release -t:Pack src\wixext\WixToolset.ComPlus.wixext.csproj + +@popd +@endlocal \ No newline at end of file diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 00000000..8d80c6af --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,42 @@ +# Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. +# +# Do NOT modify this file. Update the canonical version in Home\repo-template\src\appveyor.yml +# then update all of the repos. + +branches: + only: + - master + - develop + +image: Visual Studio 2017 + +version: 0.0.0.{build} +configuration: Release + +environment: + DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true + DOTNET_CLI_TELEMETRY_OPTOUT: 1 + NUGET_XMLDOC_MODE: skip + +build_script: + - appveyor.cmd + +pull_requests: + do_not_increment_build_number: true + +nuget: + disable_publish_on_pr: true + +skip_branch_with_pr: true +skip_tags: true + +artifacts: +- path: build\Release\**\*.nupkg + name: nuget +- path: build\Release\**\*.msi + name: msi + +notifications: +- provider: Slack + incoming_webhook: + secure: p5xuu+4x2JHfwGDMDe5KcG1k7gZxqYc4jWVwvyNZv5cvkubPD2waJs5yXMAXZNN7Z63/3PWHb7q4KoY/99AjauYa1nZ4c5qYqRPFRBKTHfA= diff --git a/nuget.config b/nuget.config new file mode 100644 index 00000000..aaee3228 --- /dev/null +++ b/nuget.config @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Cpp.Build.props b/src/Cpp.Build.props new file mode 100644 index 00000000..c6ced58e --- /dev/null +++ b/src/Cpp.Build.props @@ -0,0 +1,106 @@ + + + + + + Win32 + x86 + $(Platform) + $(BaseIntermediateOutputPath)$(Configuration)\$(NormalizedPlatform)\ + $(OutputPath)$(NormalizedPlatform)\ + + + + $([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0')) + + + + + $(DisableSpecificCompilerWarnings) + Level4 + $(ProjectDir)inc;$(MSBuildProjectDirectory);$(IntDir);$(SqlCESdkIncludePath);$(ProjectAdditionalIncludeDirectories);%(AdditionalIncludeDirectories) + WIN32;_WINDOWS;_WIN32_MSI=500;_WIN32_WINNT=0x0501;$(ArmPreprocessorDefinitions);$(UnicodePreprocessorDefinitions);_CRT_STDIO_LEGACY_WIDE_SPECIFIERS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions) + Use + precomp.h + StdCall + true + false + -YlprecompDefine + /Zc:threadSafeInit- %(AdditionalOptions) + true + + + $(ArmPreprocessorDefinitions);%(PreprocessorDefinitions) + $(ProjectAdditionalResourceIncludeDirectories);%(AdditionalIncludeDirectories) + + + $(OutDir);$(AdditionalMultiTargetLibraryPath);$(ProjectAdditionalLibraryDirectories);%(AdditionalLibraryDirectories) + + + $(ProjectSubSystem) + $(ProjectModuleDefinitionFile) + $(ResourceOnlyDll) + true + $(ProjectAdditionalLinkLibraries);advapi32.lib;comdlg32.lib;user32.lib;oleaut32.lib;gdi32.lib;shell32.lib;ole32.lib;version.lib;%(AdditionalDependencies) + $(OutDir);$(AdditionalMultiTargetLibraryPath);$(ArmLibraryDirectories);$(ProjectAdditionalLinkLibraryDirectories);%(AdditionalLibraryDirectories) + /IGNORE:4099 %(AdditionalOptions) + + + + + + NoExtensions + + + + + CDecl + + + + + OldStyle + true + true + + + + + Disabled + EnableFastChecks + _DEBUG;DEBUG;%(PreprocessorDefinitions) + MultiThreadedDebug + + + + + + MultiThreadedDebugDll + + + + + MinSpace + NDEBUG;%(PreprocessorDefinitions) + true + true + MultiThreaded + + + true + true + + + + + + MultiThreadedDll + + + + + $(LinkKeyFile) + $(LinkDelaySign) + + + diff --git a/src/Directory.Build.props b/src/Directory.Build.props new file mode 100644 index 00000000..a22f4470 --- /dev/null +++ b/src/Directory.Build.props @@ -0,0 +1,28 @@ + + + + + + Debug + false + MSB3246 + + $(MSBuildProjectName) + $([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\build\)) + $(BaseOutputPath)obj\$(ProjectName)\ + $(BaseOutputPath)$(Configuration)\ + + WiX Toolset Team + WiX Toolset + Copyright (c) .NET Foundation and contributors. All rights reserved. + MS-RL + WiX Toolset + + + + + + diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets new file mode 100644 index 00000000..dac7452a --- /dev/null +++ b/src/Directory.Build.targets @@ -0,0 +1,48 @@ + + + + + + + true + $(SolutionPath) + $(NCrunchOriginalSolutionPath) + + + + + + + $([System.IO.File]::ReadAllText($(TheSolutionPath))) + $([System.IO.Path]::GetDirectoryName( $(TheSolutionPath) )) + (?<="[PackageName]", ")(.*)(?=", ") + + + + + + %(Identity) + $(SolutionFileContent.Contains('\%(Identity).csproj')) + + + + + $(RegexPattern.Replace('[PackageName]','%(PackageName)') ) + $([System.Text.RegularExpressions.Regex]::Match('$(SolutionFileContent)', '%(Pattern)')) + + + + + + + + + + + diff --git a/src/FindLocalWix.props b/src/FindLocalWix.props new file mode 100644 index 00000000..a784e352 --- /dev/null +++ b/src/FindLocalWix.props @@ -0,0 +1,8 @@ + + + + + + $(MSBuildThisFileDirectory)..\..\Tools\build\Debug\net461\wix.targets + + diff --git a/src/Wix.Build.props b/src/Wix.Build.props new file mode 100644 index 00000000..a81c9615 --- /dev/null +++ b/src/Wix.Build.props @@ -0,0 +1,31 @@ + + + + + + $(DefineConstants);CompanyName=$(Company) + $(OutputPath)x86\ + $(OutputPath)x64\ + $(OutputPath)ARM\ + $(OutputPath)ARM64\ + $(OutputPath)Win32\ + + + + + x86 + + + x64 + + + arm + + + arm64 + + + win32 + + + diff --git a/src/ca/complusca.def b/src/ca/complusca.def new file mode 100644 index 00000000..7c475759 --- /dev/null +++ b/src/ca/complusca.def @@ -0,0 +1,15 @@ +; Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + + +LIBRARY "complusca" + +EXPORTS + ComPlusPrepare + ComPlusCleanup + ComPlusInstallExecute + ComPlusInstallExecuteCommit + ComPlusRollbackInstallExecute + ComPlusUninstallExecute + ComPlusRollbackUninstallExecute + ConfigureComPlusInstall + ConfigureComPlusUninstall diff --git a/src/ca/complusca.vcxproj b/src/ca/complusca.vcxproj new file mode 100644 index 00000000..5085f61d --- /dev/null +++ b/src/ca/complusca.vcxproj @@ -0,0 +1,99 @@ + + + + + + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + + {BDEF51ED-E242-4FA2-801A-01B127DF851A} + DynamicLibrary + v141 + Unicode + complusca + complusca.def + WiX Toolset ComPlus CustomAction + + + + + + + msi.lib + + + + + + + + + + + + + + + + + + + + + Create + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + diff --git a/src/ca/cpappexec.cpp b/src/ca/cpappexec.cpp index 43d6cd6d..48948210 100644 --- a/src/ca/cpappexec.cpp +++ b/src/ca/cpappexec.cpp @@ -239,7 +239,7 @@ static HRESULT CreateApplication( WcaLog(LOGMSG_VERBOSE, "Creating application, key: %S", pAttrs->pwzKey); // get applications collection - hr = CpiGetApplicationsCollection(pAttrs->pwzPartID, &piAppColl); + hr = CpiExecGetApplicationsCollection(pAttrs->pwzPartID, &piAppColl); if (S_FALSE == hr) hr = HRESULT_FROM_WIN32(ERROR_NOT_FOUND); ExitOnFailure(hr, "Failed to get applications collection"); @@ -304,7 +304,7 @@ static HRESULT RemoveApplication( WcaLog(LOGMSG_VERBOSE, "Removing application, key: %S", pAttrs->pwzKey); // get applications collection - hr = CpiGetApplicationsCollection(pAttrs->pwzPartID, &piAppColl); + hr = CpiExecGetApplicationsCollection(pAttrs->pwzPartID, &piAppColl); ExitOnFailure(hr, "Failed to get applications collection"); if (S_FALSE == hr) diff --git a/src/ca/cpappsched.cpp b/src/ca/cpappsched.cpp index cec99794..1fb2203b 100644 --- a/src/ca/cpappsched.cpp +++ b/src/ca/cpappsched.cpp @@ -579,7 +579,7 @@ HRESULT CpiGetRolesCollForApplication( if (pApp->pPartition) hr = CpiGetApplicationsCollForPartition(pApp->pPartition, &piAppColl); else - hr = CpiGetApplicationsCollection(&piAppColl); + hr = CpiSchedGetApplicationsCollection(&piAppColl); ExitOnFailure(hr, "Failed to get applications collection"); if (S_FALSE == hr) @@ -593,7 +593,7 @@ HRESULT CpiGetRolesCollForApplication( ExitFunction(); // exit with hr = S_FALSE // get roles collection - hr = CpiGetCatalogCollection(piAppColl, piAppObj, L"Roles", &pApp->piRolesColl); + hr = CpiSchedGetCatalogCollection(piAppColl, piAppObj, L"Roles", &pApp->piRolesColl); ExitOnFailure(hr, "Failed to get roles collection"); } @@ -632,7 +632,7 @@ HRESULT CpiGetComponentsCollForApplication( if (pApp->pPartition) hr = CpiGetApplicationsCollForPartition(pApp->pPartition, &piAppColl); else - hr = CpiGetApplicationsCollection(&piAppColl); + hr = CpiSchedGetApplicationsCollection(&piAppColl); ExitOnFailure(hr, "Failed to get applications collection"); if (S_FALSE == hr) @@ -646,7 +646,7 @@ HRESULT CpiGetComponentsCollForApplication( ExitFunction(); // exit with hr = S_FALSE // get roles collection - hr = CpiGetCatalogCollection(piAppColl, piAppObj, L"Components", &pApp->piCompsColl); + hr = CpiSchedGetCatalogCollection(piAppColl, piAppObj, L"Components", &pApp->piCompsColl); ExitOnFailure(hr, "Failed to get components collection"); } @@ -695,7 +695,7 @@ static HRESULT FindObjectForApplication( if (pItm->pPartition) hr = CpiGetApplicationsCollForPartition(pItm->pPartition, &piAppColl); else - hr = CpiGetApplicationsCollection(&piAppColl); + hr = CpiSchedGetApplicationsCollection(&piAppColl); ExitOnFailure(hr, "Failed to get applications collection"); if (S_FALSE == hr) diff --git a/src/ca/cpasmexec.cpp b/src/ca/cpasmexec.cpp index 339c08e1..3d140027 100644 --- a/src/ca/cpasmexec.cpp +++ b/src/ca/cpasmexec.cpp @@ -75,58 +75,47 @@ enum eInstallationFlags { }; -// private constants - -enum eAssemblyAttributes -{ - aaEventClass = (1 << 0), - aaDotNetAssembly = (1 << 1), - aaPathFromGAC = (1 << 2), - aaRunInCommit = (1 << 3) -}; - - // private structs -struct CPI_ROLE_ASSIGNMENT +struct CPIEXEC_ROLE_ASSIGNMENT { WCHAR wzKey[MAX_DARWIN_KEY + 1]; WCHAR wzRoleName[MAX_DARWIN_COLUMN + 1]; - CPI_ROLE_ASSIGNMENT* pNext; + CPIEXEC_ROLE_ASSIGNMENT* pNext; }; -struct CPI_METHOD +struct CPIEXEC_METHOD { WCHAR wzIndex[11 + 1]; WCHAR wzName[MAX_DARWIN_COLUMN + 1]; CPI_PROPERTY* pPropertyList; - CPI_ROLE_ASSIGNMENT* pRoleAssignmentList; + CPIEXEC_ROLE_ASSIGNMENT* pRoleAssignmentList; - CPI_METHOD* pNext; + CPIEXEC_METHOD* pNext; }; -struct CPI_INTERFACE +struct CPIEXEC_INTERFACE { WCHAR wzIID[CPI_MAX_GUID + 1]; CPI_PROPERTY* pPropertyList; - CPI_ROLE_ASSIGNMENT* pRoleAssignmentList; - CPI_METHOD* pMethodList; + CPIEXEC_ROLE_ASSIGNMENT* pRoleAssignmentList; + CPIEXEC_METHOD* pMethodList; - CPI_INTERFACE* pNext; + CPIEXEC_INTERFACE* pNext; }; -struct CPI_COMPONENT +struct CPIEXEC_COMPONENT { WCHAR wzCLSID[CPI_MAX_GUID + 1]; CPI_PROPERTY* pPropertyList; - CPI_ROLE_ASSIGNMENT* pRoleAssignmentList; - CPI_INTERFACE* pInterfaceList; + CPIEXEC_ROLE_ASSIGNMENT* pRoleAssignmentList; + CPIEXEC_INTERFACE* pInterfaceList; - CPI_COMPONENT* pNext; + CPIEXEC_COMPONENT* pNext; }; struct CPI_ASSEMBLY_ATTRIBUTES @@ -141,7 +130,7 @@ struct CPI_ASSEMBLY_ATTRIBUTES LPWSTR pwzAppID; LPWSTR pwzPartID; int iAttributes; - CPI_COMPONENT* pCompList; + CPIEXEC_COMPONENT* pCompList; }; struct CPI_ROLE_ASSIGNMENTS_ATTRIBUTES @@ -152,7 +141,7 @@ struct CPI_ROLE_ASSIGNMENTS_ATTRIBUTES LPWSTR pwzAppID; LPWSTR pwzPartID; int iRoleCount; - CPI_COMPONENT* pCompList; + CPIEXEC_COMPONENT* pCompList; }; @@ -187,7 +176,7 @@ static HRESULT UnregisterDotNetAssembly( ); static HRESULT RemoveComponents( ICatalogCollection* piCompColl, - CPI_COMPONENT* pCompList + CPIEXEC_COMPONENT* pCompList ); static HRESULT ReadAssemblyAttributes( LPWSTR* ppwzData, @@ -206,56 +195,56 @@ static void FreeRoleAssignmentsAttributes( static HRESULT ConfigureComponents( LPCWSTR pwzPartID, LPCWSTR pwzAppID, - CPI_COMPONENT* pCompList, + CPIEXEC_COMPONENT* pCompList, BOOL fCreate, BOOL fProgress ); static HRESULT ConfigureInterfaces( ICatalogCollection* piCompColl, ICatalogObject* piCompObj, - CPI_INTERFACE* pIntfList, + CPIEXEC_INTERFACE* pIntfList, BOOL fCreate ); static HRESULT ConfigureMethods( ICatalogCollection* piIntfColl, ICatalogObject* piIntfObj, - CPI_METHOD* pMethList, + CPIEXEC_METHOD* pMethList, BOOL fCreate ); static HRESULT ConfigureRoleAssignments( LPCWSTR pwzCollName, ICatalogCollection* piCompColl, ICatalogObject* piCompObj, - CPI_ROLE_ASSIGNMENT* pRoleList, + CPIEXEC_ROLE_ASSIGNMENT* pRoleList, BOOL fCreate ); static HRESULT ReadComponentList( LPWSTR* ppwzData, - CPI_COMPONENT** ppCompList + CPIEXEC_COMPONENT** ppCompList ); static HRESULT ReadInterfaceList( LPWSTR* ppwzData, - CPI_INTERFACE** ppIntfList + CPIEXEC_INTERFACE** ppIntfList ); static HRESULT ReadMethodList( LPWSTR* ppwzData, - CPI_METHOD** ppMethList + CPIEXEC_METHOD** ppMethList ); static HRESULT ReadRoleAssignmentList( LPWSTR* ppwzData, - CPI_ROLE_ASSIGNMENT** ppRoleList + CPIEXEC_ROLE_ASSIGNMENT** ppRoleList ); static void FreeComponentList( - CPI_COMPONENT* pList + CPIEXEC_COMPONENT* pList ); static void FreeInterfaceList( - CPI_INTERFACE* pList + CPIEXEC_INTERFACE* pList ); static void FreeMethodList( - CPI_METHOD* pList + CPIEXEC_METHOD* pList ); static void FreeRoleAssignmentList( - CPI_ROLE_ASSIGNMENT* pList + CPIEXEC_ROLE_ASSIGNMENT* pList ); @@ -648,7 +637,7 @@ static HRESULT UnregisterAssembly( // TODO: handle rollbacks // get applications collection - hr = CpiGetApplicationsCollection(pAttrs->pwzPartID, &piColl); + hr = CpiExecGetApplicationsCollection(pAttrs->pwzPartID, &piColl); ExitOnFailure(hr, "Failed to get applications collection"); if (S_FALSE == hr) @@ -993,7 +982,7 @@ static HRESULT RegisterNativeAssembly( ExitOnNull(bstrPSDllPath, hr, E_OUTOFMEMORY, "Failed to allocate BSTR for tlb path"); // get catalog - hr = CpiGetAdminCatalog(&piCatalog); + hr = CpiExecGetAdminCatalog(&piCatalog); ExitOnFailure(hr, "Failed to get COM+ admin catalog"); // get ICOMAdminCatalog2 interface @@ -1154,12 +1143,12 @@ LExit: static HRESULT RemoveComponents( ICatalogCollection* piCompColl, - CPI_COMPONENT* pCompList + CPIEXEC_COMPONENT* pCompList ) { HRESULT hr = S_OK; - for (CPI_COMPONENT* pItm = pCompList; pItm; pItm = pItm->pNext) + for (CPIEXEC_COMPONENT* pItm = pCompList; pItm; pItm = pItm->pNext) { // remove hr = CpiRemoveCollectionObject(piCompColl, pItm->wzCLSID, NULL, FALSE); @@ -1291,7 +1280,7 @@ static void FreeRoleAssignmentsAttributes( static HRESULT ConfigureComponents( LPCWSTR pwzPartID, LPCWSTR pwzAppID, - CPI_COMPONENT* pCompList, + CPIEXEC_COMPONENT* pCompList, BOOL fCreate, BOOL fProgress ) @@ -1313,7 +1302,7 @@ static HRESULT ConfigureComponents( ExitOnFailure(hr, "Failed to get components collection"); // read components - for (CPI_COMPONENT* pItm = pCompList; pItm; pItm = pItm->pNext) + for (CPIEXEC_COMPONENT* pItm = pCompList; pItm; pItm = pItm->pNext) { // progress message if (fProgress) @@ -1375,7 +1364,7 @@ LExit: static HRESULT ConfigureInterfaces( ICatalogCollection* piCompColl, ICatalogObject* piCompObj, - CPI_INTERFACE* pIntfList, + CPIEXEC_INTERFACE* pIntfList, BOOL fCreate ) { @@ -1396,7 +1385,7 @@ static HRESULT ConfigureInterfaces( ExitOnFailure(hr, "Failed to get interfaces collection"); // read interfaces - for (CPI_INTERFACE* pItm = pIntfList; pItm; pItm = pItm->pNext) + for (CPIEXEC_INTERFACE* pItm = pIntfList; pItm; pItm = pItm->pNext) { // find interface hr = CpiFindCollectionObjectByStringKey(piIntfColl, pItm->wzIID, &piIntfObj); @@ -1448,7 +1437,7 @@ LExit: static HRESULT ConfigureMethods( ICatalogCollection* piIntfColl, ICatalogObject* piIntfObj, - CPI_METHOD* pMethList, + CPIEXEC_METHOD* pMethList, BOOL fCreate ) { @@ -1469,7 +1458,7 @@ static HRESULT ConfigureMethods( ExitOnFailure(hr, "Failed to get methods collection"); // read methods - for (CPI_METHOD* pItm = pMethList; pItm; pItm = pItm->pNext) + for (CPIEXEC_METHOD* pItm = pMethList; pItm; pItm = pItm->pNext) { // find method if (*pItm->wzIndex) @@ -1519,7 +1508,7 @@ static HRESULT ConfigureRoleAssignments( LPCWSTR pwzCollName, ICatalogCollection* piCompColl, ICatalogObject* piCompObj, - CPI_ROLE_ASSIGNMENT* pRoleList, + CPIEXEC_ROLE_ASSIGNMENT* pRoleList, BOOL fCreate ) { @@ -1531,7 +1520,7 @@ static HRESULT ConfigureRoleAssignments( long lChanges = 0; // get roles collection - hr = CpiGetCatalogCollection(piCompColl, piCompObj, pwzCollName, &piRoleColl); + hr = CpiExecGetCatalogCollection(piCompColl, piCompObj, pwzCollName, &piRoleColl); if (S_FALSE == hr) if (fCreate) hr = HRESULT_FROM_WIN32(ERROR_NOT_FOUND); @@ -1540,7 +1529,7 @@ static HRESULT ConfigureRoleAssignments( ExitOnFailure(hr, "Failed to get role assignments collection"); // read roles - for (CPI_ROLE_ASSIGNMENT* pItm = pRoleList; pItm; pItm = pItm->pNext) + for (CPIEXEC_ROLE_ASSIGNMENT* pItm = pRoleList; pItm; pItm = pItm->pNext) { if (fCreate) { @@ -1588,14 +1577,14 @@ LExit: static HRESULT ReadComponentList( LPWSTR* ppwzData, - CPI_COMPONENT** ppCompList + CPIEXEC_COMPONENT** ppCompList ) { HRESULT hr = S_OK; LPWSTR pwzData = NULL; - CPI_COMPONENT* pItm = NULL; + CPIEXEC_COMPONENT* pItm = NULL; int iCnt = 0; @@ -1606,7 +1595,7 @@ static HRESULT ReadComponentList( // read components for (int i = 0; i < iCnt; i++) { - pItm = (CPI_COMPONENT*)::HeapAlloc(::GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(CPI_COMPONENT)); + pItm = (CPIEXEC_COMPONENT*)::HeapAlloc(::GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(CPIEXEC_COMPONENT)); if (!pItm) ExitFunction1(hr = E_OUTOFMEMORY); @@ -1648,14 +1637,14 @@ LExit: static HRESULT ReadInterfaceList( LPWSTR* ppwzData, - CPI_INTERFACE** ppIntfList + CPIEXEC_INTERFACE** ppIntfList ) { HRESULT hr = S_OK; LPWSTR pwzData = NULL; - CPI_INTERFACE* pItm = NULL; + CPIEXEC_INTERFACE* pItm = NULL; int iCnt = 0; @@ -1666,7 +1655,7 @@ static HRESULT ReadInterfaceList( // read interfaces for (int i = 0; i < iCnt; i++) { - pItm = (CPI_INTERFACE*)::HeapAlloc(::GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(CPI_INTERFACE)); + pItm = (CPIEXEC_INTERFACE*)::HeapAlloc(::GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(CPIEXEC_INTERFACE)); if (!pItm) ExitFunction1(hr = E_OUTOFMEMORY); @@ -1708,14 +1697,14 @@ LExit: static HRESULT ReadMethodList( LPWSTR* ppwzData, - CPI_METHOD** ppMethList + CPIEXEC_METHOD** ppMethList ) { HRESULT hr = S_OK; LPWSTR pwzData = NULL; - CPI_METHOD* pItm = NULL; + CPIEXEC_METHOD* pItm = NULL; int iCnt = 0; @@ -1726,7 +1715,7 @@ static HRESULT ReadMethodList( // read methods for (int i = 0; i < iCnt; i++) { - pItm = (CPI_METHOD*)::HeapAlloc(::GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(CPI_METHOD)); + pItm = (CPIEXEC_METHOD*)::HeapAlloc(::GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(CPIEXEC_METHOD)); if (!pItm) ExitFunction1(hr = E_OUTOFMEMORY); @@ -1769,14 +1758,14 @@ LExit: static HRESULT ReadRoleAssignmentList( LPWSTR* ppwzData, - CPI_ROLE_ASSIGNMENT** ppRoleList + CPIEXEC_ROLE_ASSIGNMENT** ppRoleList ) { HRESULT hr = S_OK; LPWSTR pwzData = NULL; - CPI_ROLE_ASSIGNMENT* pItm = NULL; + CPIEXEC_ROLE_ASSIGNMENT* pItm = NULL; int iCnt = 0; @@ -1787,7 +1776,7 @@ static HRESULT ReadRoleAssignmentList( // read roles for (int i = 0; i < iCnt; i++) { - pItm = (CPI_ROLE_ASSIGNMENT*)::HeapAlloc(::GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(CPI_ROLE_ASSIGNMENT)); + pItm = (CPIEXEC_ROLE_ASSIGNMENT*)::HeapAlloc(::GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(CPIEXEC_ROLE_ASSIGNMENT)); if (!pItm) ExitFunction1(hr = E_OUTOFMEMORY); @@ -1821,7 +1810,7 @@ LExit: } static void FreeComponentList( - CPI_COMPONENT* pList + CPIEXEC_COMPONENT* pList ) { while (pList) @@ -1833,14 +1822,14 @@ static void FreeComponentList( if (pList->pInterfaceList) FreeInterfaceList(pList->pInterfaceList); - CPI_COMPONENT* pDelete = pList; + CPIEXEC_COMPONENT* pDelete = pList; pList = pList->pNext; ::HeapFree(::GetProcessHeap(), 0, pDelete); } } static void FreeInterfaceList( - CPI_INTERFACE* pList + CPIEXEC_INTERFACE* pList ) { while (pList) @@ -1852,14 +1841,14 @@ static void FreeInterfaceList( if (pList->pMethodList) FreeMethodList(pList->pMethodList); - CPI_INTERFACE* pDelete = pList; + CPIEXEC_INTERFACE* pDelete = pList; pList = pList->pNext; ::HeapFree(::GetProcessHeap(), 0, pDelete); } } static void FreeMethodList( - CPI_METHOD* pList + CPIEXEC_METHOD* pList ) { while (pList) @@ -1869,19 +1858,19 @@ static void FreeMethodList( if (pList->pRoleAssignmentList) FreeRoleAssignmentList(pList->pRoleAssignmentList); - CPI_METHOD* pDelete = pList; + CPIEXEC_METHOD* pDelete = pList; pList = pList->pNext; ::HeapFree(::GetProcessHeap(), 0, pDelete); } } static void FreeRoleAssignmentList( - CPI_ROLE_ASSIGNMENT* pList + CPIEXEC_ROLE_ASSIGNMENT* pList ) { while (pList) { - CPI_ROLE_ASSIGNMENT* pDelete = pList; + CPIEXEC_ROLE_ASSIGNMENT* pDelete = pList; pList = pList->pNext; ::HeapFree(::GetProcessHeap(), 0, pDelete); } diff --git a/src/ca/cpasmsched.cpp b/src/ca/cpasmsched.cpp index 97ecff61..2d0573a5 100644 --- a/src/ca/cpasmsched.cpp +++ b/src/ca/cpasmsched.cpp @@ -169,19 +169,19 @@ static HRESULT InterfacesRead( LPCWSTR pwzCompKey, CPI_APPLICATION_ROLE_LIST* pAppRoleList, CPI_ASSEMBLY* pAsm, - CPI_COMPONENT* pComp + CPISCHED_COMPONENT* pComp ); static HRESULT MethodsRead( LPCWSTR pwzIntfKey, CPI_APPLICATION_ROLE_LIST* pAppRoleList, CPI_ASSEMBLY* pAsm, - CPI_INTERFACE* pIntf + CPISCHED_INTERFACE* pIntf ); static HRESULT RoleAssignmentsRead( LPCWSTR pwzQuery, LPCWSTR pwzKey, CPI_APPLICATION_ROLE_LIST* pAppRoleList, - CPI_ROLE_ASSIGNMENT** ppRoleList, + CPISCHED_ROLE_ASSIGNMENT** ppRoleList, int* piInstallCount, int* piUninstallCount ); @@ -238,21 +238,21 @@ static HRESULT AddRoleAssignmentsToActionData( LPWSTR* ppwzActionData ); static HRESULT AddComponentToActionData( - CPI_COMPONENT* pItm, + CPISCHED_COMPONENT* pItm, BOOL fInstall, BOOL fProps, BOOL fRoles, LPWSTR* ppwzActionData ); static HRESULT AddInterfaceToActionData( - CPI_INTERFACE* pItm, + CPISCHED_INTERFACE* pItm, BOOL fInstall, BOOL fProps, BOOL fRoles, LPWSTR* ppwzActionData ); static HRESULT AddMethodToActionData( - CPI_METHOD* pItm, + CPISCHED_METHOD* pItm, BOOL fInstall, BOOL fProps, BOOL fRoles, @@ -261,7 +261,7 @@ static HRESULT AddMethodToActionData( static HRESULT AddRolesToActionData( int iRoleInstallCount, int iRoleUninstallCount, - CPI_ROLE_ASSIGNMENT* pRoleList, + CPISCHED_ROLE_ASSIGNMENT* pRoleList, BOOL fInstall, BOOL fRoles, LPWSTR* ppwzActionData @@ -284,16 +284,16 @@ static void ModuleFree( CPI_MODULE* pItm ); static void ComponentsFreeList( - CPI_COMPONENT* pList + CPISCHED_COMPONENT* pList ); static void InterfacesFreeList( - CPI_INTERFACE* pList + CPISCHED_INTERFACE* pList ); static void MethodsFreeList( - CPI_METHOD* pList + CPISCHED_METHOD* pList ); static void RoleAssignmentsFreeList( - CPI_ROLE_ASSIGNMENT* pList + CPISCHED_ROLE_ASSIGNMENT* pList ); @@ -686,7 +686,7 @@ LExit: HRESULT CpiGetSubscriptionsCollForComponent( CPI_ASSEMBLY* pAsm, - CPI_COMPONENT* pComp, + CPISCHED_COMPONENT* pComp, ICatalogCollection** ppiSubsColl ) { @@ -713,7 +713,7 @@ HRESULT CpiGetSubscriptionsCollForComponent( ExitFunction(); // exit with hr = S_FALSE // get roles collection - hr = CpiGetCatalogCollection(piCompColl, piCompObj, L"SubscriptionsForComponent", &pComp->piSubsColl); + hr = CpiSchedGetCatalogCollection(piCompColl, piCompObj, L"SubscriptionsForComponent", &pComp->piSubsColl); ExitOnFailure(hr, "Failed to get subscriptions collection"); } @@ -1372,7 +1372,7 @@ static HRESULT ComponentsRead( PMSIHANDLE hView; PMSIHANDLE hRec; PMSIHANDLE hRecKey; - CPI_COMPONENT* pItm = NULL; + CPISCHED_COMPONENT* pItm = NULL; LPWSTR pwzData = NULL; // create parameter record @@ -1390,7 +1390,7 @@ static HRESULT ComponentsRead( while (S_OK == (hr = WcaFetchRecord(hView, &hRec))) { // create entry - pItm = (CPI_COMPONENT*)::HeapAlloc(::GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(CPI_COMPONENT)); + pItm = (CPISCHED_COMPONENT*)::HeapAlloc(::GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(CPISCHED_COMPONENT)); if (!pItm) ExitFunction1(hr = E_OUTOFMEMORY); @@ -1455,14 +1455,14 @@ static HRESULT InterfacesRead( LPCWSTR pwzCompKey, CPI_APPLICATION_ROLE_LIST* pAppRoleList, CPI_ASSEMBLY* pAsm, - CPI_COMPONENT* pComp + CPISCHED_COMPONENT* pComp ) { HRESULT hr = S_OK; PMSIHANDLE hView; PMSIHANDLE hRec; PMSIHANDLE hRecKey; - CPI_INTERFACE* pItm = NULL; + CPISCHED_INTERFACE* pItm = NULL; LPWSTR pwzData = NULL; // create parameter record @@ -1480,7 +1480,7 @@ static HRESULT InterfacesRead( while (S_OK == (hr = WcaFetchRecord(hView, &hRec))) { // create entry - pItm = (CPI_INTERFACE*)::HeapAlloc(::GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(CPI_INTERFACE)); + pItm = (CPISCHED_INTERFACE*)::HeapAlloc(::GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(CPISCHED_INTERFACE)); if (!pItm) ExitFunction1(hr = E_OUTOFMEMORY); @@ -1545,12 +1545,12 @@ static HRESULT MethodsRead( LPCWSTR pwzIntfKey, CPI_APPLICATION_ROLE_LIST* pAppRoleList, CPI_ASSEMBLY* pAsm, - CPI_INTERFACE* pIntf + CPISCHED_INTERFACE* pIntf ) { HRESULT hr = S_OK; PMSIHANDLE hView, hRec, hRecKey; - CPI_METHOD* pItm = NULL; + CPISCHED_METHOD* pItm = NULL; LPWSTR pwzData = NULL; // create parameter record @@ -1568,7 +1568,7 @@ static HRESULT MethodsRead( while (S_OK == (hr = WcaFetchRecord(hView, &hRec))) { // create entry - pItm = (CPI_METHOD*)::HeapAlloc(::GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(CPI_METHOD)); + pItm = (CPISCHED_METHOD*)::HeapAlloc(::GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(CPISCHED_METHOD)); if (!pItm) ExitFunction1(hr = E_OUTOFMEMORY); @@ -1635,7 +1635,7 @@ static HRESULT RoleAssignmentsRead( LPCWSTR pwzQuery, LPCWSTR pwzKey, CPI_APPLICATION_ROLE_LIST* pAppRoleList, - CPI_ROLE_ASSIGNMENT** ppRoleList, + CPISCHED_ROLE_ASSIGNMENT** ppRoleList, int* piInstallCount, int* piUninstallCount ) @@ -1645,7 +1645,7 @@ static HRESULT RoleAssignmentsRead( PMSIHANDLE hView, hRec, hRecKey; - CPI_ROLE_ASSIGNMENT* pItm = NULL; + CPISCHED_ROLE_ASSIGNMENT* pItm = NULL; LPWSTR pwzData = NULL; BOOL fMatchingArchitecture = FALSE; @@ -1677,7 +1677,7 @@ static HRESULT RoleAssignmentsRead( } // create entry - pItm = (CPI_ROLE_ASSIGNMENT*)::HeapAlloc(::GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(CPI_ROLE_ASSIGNMENT)); + pItm = (CPISCHED_ROLE_ASSIGNMENT*)::HeapAlloc(::GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(CPISCHED_ROLE_ASSIGNMENT)); if (!pItm) ExitFunction1(hr = E_OUTOFMEMORY); @@ -1786,7 +1786,7 @@ static HRESULT AddAssemblyToActionData( if (iCompCount) { - for (CPI_COMPONENT* pComp = pItm->pComponents; pComp; pComp = pComp->pNext) + for (CPISCHED_COMPONENT* pComp = pItm->pComponents; pComp; pComp = pComp->pNext) { hr = AddComponentToActionData(pComp, fInstall, atCreate == iActionType, FALSE, ppwzActionData); ExitOnFailure(hr, "Failed to add component to custom action data, component: %S", pComp->wzKey); @@ -1834,7 +1834,7 @@ static HRESULT AddRoleAssignmentsToActionData( hr = WcaWriteIntegerToCaData(pItm->iComponentCount, ppwzActionData); ExitOnFailure(hr, "Failed to add component count to custom action data"); - for (CPI_COMPONENT* pComp = pItm->pComponents; pComp; pComp = pComp->pNext) + for (CPISCHED_COMPONENT* pComp = pItm->pComponents; pComp; pComp = pComp->pNext) { hr = AddComponentToActionData(pComp, fInstall, FALSE, TRUE, ppwzActionData); ExitOnFailure(hr, "Failed to add component to custom action data, component: %S", pComp->wzKey); @@ -1847,7 +1847,7 @@ LExit: } static HRESULT AddComponentToActionData( - CPI_COMPONENT* pItm, + CPISCHED_COMPONENT* pItm, BOOL fInstall, BOOL fProps, BOOL fRoles, @@ -1875,7 +1875,7 @@ static HRESULT AddComponentToActionData( if (iIntfCount) { - for (CPI_INTERFACE* pIntf = pItm->pInterfaces; pIntf; pIntf = pIntf->pNext) + for (CPISCHED_INTERFACE* pIntf = pItm->pInterfaces; pIntf; pIntf = pIntf->pNext) { hr = AddInterfaceToActionData(pIntf, fInstall, fProps, fRoles, ppwzActionData); ExitOnFailure(hr, "Failed to add interface custom action data, interface: %S", pIntf->wzKey); @@ -1889,7 +1889,7 @@ LExit: } static HRESULT AddInterfaceToActionData( - CPI_INTERFACE* pItm, + CPISCHED_INTERFACE* pItm, BOOL fInstall, BOOL fProps, BOOL fRoles, @@ -1914,7 +1914,7 @@ static HRESULT AddInterfaceToActionData( hr = WcaWriteIntegerToCaData(pItm->iMethodCount, ppwzActionData); ExitOnFailure(hr, "Failed to add method count to custom action data"); - for (CPI_METHOD* pMeth = pItm->pMethods; pMeth; pMeth = pMeth->pNext) + for (CPISCHED_METHOD* pMeth = pItm->pMethods; pMeth; pMeth = pMeth->pNext) { hr = AddMethodToActionData(pMeth, fInstall, fProps, fRoles, ppwzActionData); ExitOnFailure(hr, "Failed to add method custom action data, method: %S", pMeth->wzKey); @@ -1927,7 +1927,7 @@ LExit: } static HRESULT AddMethodToActionData( - CPI_METHOD* pItm, + CPISCHED_METHOD* pItm, BOOL fInstall, BOOL fProps, BOOL fRoles, @@ -1960,7 +1960,7 @@ LExit: static HRESULT AddRolesToActionData( int iRoleInstallCount, int iRoleUninstallCount, - CPI_ROLE_ASSIGNMENT* pRoleList, + CPISCHED_ROLE_ASSIGNMENT* pRoleList, BOOL fInstall, BOOL fRoles, LPWSTR* ppwzActionData @@ -1974,7 +1974,7 @@ static HRESULT AddRolesToActionData( if (iRoleCount) { - for (CPI_ROLE_ASSIGNMENT* pRole = pRoleList; pRole; pRole = pRole->pNext) + for (CPISCHED_ROLE_ASSIGNMENT* pRole = pRoleList; pRole; pRole = pRole->pNext) { // make sure the install state matches the create flag if (fInstall ? !WcaIsInstalling(pRole->isInstalled, pRole->isAction) : !WcaIsUninstalling(pRole->isInstalled, pRole->isAction)) @@ -2061,7 +2061,7 @@ static void ModuleFree( } static void ComponentsFreeList( - CPI_COMPONENT* pList + CPISCHED_COMPONENT* pList ) { while (pList) @@ -2077,14 +2077,14 @@ static void ComponentsFreeList( ReleaseObject(pList->piSubsColl); - CPI_COMPONENT* pDelete = pList; + CPISCHED_COMPONENT* pDelete = pList; pList = pList->pNext; ::HeapFree(::GetProcessHeap(), 0, pDelete); } } static void InterfacesFreeList( - CPI_INTERFACE* pList + CPISCHED_INTERFACE* pList ) { while (pList) @@ -2098,14 +2098,14 @@ static void InterfacesFreeList( if (pList->pMethods) MethodsFreeList(pList->pMethods); - CPI_INTERFACE* pDelete = pList; + CPISCHED_INTERFACE* pDelete = pList; pList = pList->pNext; ::HeapFree(::GetProcessHeap(), 0, pDelete); } } static void MethodsFreeList( - CPI_METHOD* pList + CPISCHED_METHOD* pList ) { while (pList) @@ -2116,19 +2116,19 @@ static void MethodsFreeList( if (pList->pRoles) RoleAssignmentsFreeList(pList->pRoles); - CPI_METHOD* pDelete = pList; + CPISCHED_METHOD* pDelete = pList; pList = pList->pNext; ::HeapFree(::GetProcessHeap(), 0, pDelete); } } static void RoleAssignmentsFreeList( - CPI_ROLE_ASSIGNMENT* pList + CPISCHED_ROLE_ASSIGNMENT* pList ) { while (pList) { - CPI_ROLE_ASSIGNMENT* pDelete = pList; + CPISCHED_ROLE_ASSIGNMENT* pDelete = pList; pList = pList->pNext; ::HeapFree(::GetProcessHeap(), 0, pDelete); } diff --git a/src/ca/cpasmsched.h b/src/ca/cpasmsched.h index b5a68d7e..ddf4b6c0 100644 --- a/src/ca/cpasmsched.h +++ b/src/ca/cpasmsched.h @@ -13,7 +13,7 @@ enum eAssemblyAttributes // structs -struct CPI_ROLE_ASSIGNMENT +struct CPISCHED_ROLE_ASSIGNMENT { WCHAR wzKey[MAX_DARWIN_KEY + 1]; @@ -21,10 +21,10 @@ struct CPI_ROLE_ASSIGNMENT CPI_APPLICATION_ROLE* pApplicationRole; - CPI_ROLE_ASSIGNMENT* pNext; + CPISCHED_ROLE_ASSIGNMENT* pNext; }; -struct CPI_METHOD +struct CPISCHED_METHOD { WCHAR wzKey[MAX_DARWIN_KEY + 1]; WCHAR wzIndex[11 + 1]; @@ -35,12 +35,12 @@ struct CPI_METHOD int iRoleInstallCount; int iRoleUninstallCount; - CPI_ROLE_ASSIGNMENT* pRoles; + CPISCHED_ROLE_ASSIGNMENT* pRoles; - CPI_METHOD* pNext; + CPISCHED_METHOD* pNext; }; -struct CPI_INTERFACE +struct CPISCHED_INTERFACE { WCHAR wzKey[MAX_DARWIN_KEY + 1]; WCHAR wzIID[CPI_MAX_GUID + 1]; @@ -50,15 +50,15 @@ struct CPI_INTERFACE int iRoleInstallCount; int iRoleUninstallCount; - CPI_ROLE_ASSIGNMENT* pRoles; + CPISCHED_ROLE_ASSIGNMENT* pRoles; int iMethodCount; - CPI_METHOD* pMethods; + CPISCHED_METHOD* pMethods; - CPI_INTERFACE* pNext; + CPISCHED_INTERFACE* pNext; }; -struct CPI_COMPONENT +struct CPISCHED_COMPONENT { WCHAR wzKey[MAX_DARWIN_KEY + 1]; WCHAR wzCLSID[CPI_MAX_GUID + 1]; @@ -68,14 +68,14 @@ struct CPI_COMPONENT int iRoleInstallCount; int iRoleUninstallCount; - CPI_ROLE_ASSIGNMENT* pRoles; + CPISCHED_ROLE_ASSIGNMENT* pRoles; int iInterfaceCount; - CPI_INTERFACE* pInterfaces; + CPISCHED_INTERFACE* pInterfaces; ICatalogCollection* piSubsColl; - CPI_COMPONENT* pNext; + CPISCHED_COMPONENT* pNext; }; struct CPI_ASSEMBLY @@ -89,7 +89,7 @@ struct CPI_ASSEMBLY int iAttributes; int iComponentCount; - CPI_COMPONENT* pComponents; + CPISCHED_COMPONENT* pComponents; BOOL fReferencedForInstall; BOOL fReferencedForUninstall; @@ -163,6 +163,6 @@ HRESULT CpiRoleAssignmentsUninstall( ); HRESULT CpiGetSubscriptionsCollForComponent( CPI_ASSEMBLY* pAsm, - CPI_COMPONENT* pComp, + CPISCHED_COMPONENT* pComp, ICatalogCollection** ppiSubsColl ); diff --git a/src/ca/cpexec.cpp b/src/ca/cpexec.cpp index fa2446d8..9b1691fc 100644 --- a/src/ca/cpexec.cpp +++ b/src/ca/cpexec.cpp @@ -2,29 +2,6 @@ #include "precomp.h" -/******************************************************************** - DllMain - standard entry point for all WiX CustomActions - -********************************************************************/ -extern "C" BOOL WINAPI DllMain( - IN HINSTANCE hInst, - IN ULONG ulReason, - IN LPVOID) -{ - switch(ulReason) - { - case DLL_PROCESS_ATTACH: - WcaGlobalInitialize(hInst); - break; - - case DLL_PROCESS_DETACH: - WcaGlobalFinalize(); - break; - } - - return TRUE; -} - /******************************************************************** ComPlusPrepare - CUSTOM ACTION ENTRY POINT @@ -133,7 +110,7 @@ extern "C" UINT __stdcall ComPlusInstallExecute(MSIHANDLE hInstall) ExitOnFailure(hr, "Failed to initialize COM"); fInitializedCom = TRUE; - CpiInitialize(); + CpiExecInitialize(); // get custom action data hr = WcaGetProperty(L"CustomActionData", &pwzCustomActionData); @@ -204,7 +181,7 @@ LExit: ::CloseHandle(hRollbackFile); // unitialize - CpiFinalize(); + CpiExecFinalize(); if (fInitializedCom) ::CoUninitialize(); @@ -239,7 +216,7 @@ extern "C" UINT __stdcall ComPlusInstallExecuteCommit(MSIHANDLE hInstall) ExitOnFailure(hr, "Failed to initialize COM"); fInitializedCom = TRUE; - CpiInitialize(); + CpiExecInitialize(); // get custom action data hr = WcaGetProperty(L"CustomActionData", &pwzCustomActionData); @@ -282,7 +259,7 @@ LExit: ::CloseHandle(hRollbackFile); // unitialize - CpiFinalize(); + CpiExecFinalize(); if (fInitializedCom) ::CoUninitialize(); @@ -327,7 +304,7 @@ extern "C" UINT __stdcall ComPlusRollbackInstallExecute(MSIHANDLE hInstall) ExitOnFailure(hr, "Failed to initialize COM"); fInitializedCom = TRUE; - CpiInitialize(); + CpiExecInitialize(); // get custom action data hr = WcaGetProperty(L"CustomActionData", &pwzCustomActionData); @@ -439,7 +416,7 @@ LExit: CpiFreeRollbackDataList(prdSubscriptions); // unitialize - CpiFinalize(); + CpiExecFinalize(); if (fInitializedCom) ::CoUninitialize(); @@ -474,7 +451,7 @@ extern "C" UINT __stdcall ComPlusUninstallExecute(MSIHANDLE hInstall) ExitOnFailure(hr, "Failed to initialize COM"); fInitializedCom = TRUE; - CpiInitialize(); + CpiExecInitialize(); // get custom action data hr = WcaGetProperty(L"CustomActionData", &pwzCustomActionData); @@ -545,7 +522,7 @@ LExit: ::CloseHandle(hRollbackFile); // unitialize - CpiFinalize(); + CpiExecFinalize(); if (fInitializedCom) ::CoUninitialize(); @@ -590,7 +567,7 @@ extern "C" UINT __stdcall ComPlusRollbackUninstallExecute(MSIHANDLE hInstall) ExitOnFailure(hr, "Failed to initialize COM"); fInitializedCom = TRUE; - CpiInitialize(); + CpiExecInitialize(); // get custom action data hr = WcaGetProperty(L"CustomActionData", &pwzCustomActionData); @@ -694,7 +671,7 @@ LExit: CpiFreeRollbackDataList(prdSubscriptions); // unitialize - CpiFinalize(); + CpiExecFinalize(); if (fInitializedCom) ::CoUninitialize(); diff --git a/src/ca/cpexec.def b/src/ca/cpexec.def deleted file mode 100644 index 1dad15c2..00000000 --- a/src/ca/cpexec.def +++ /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. - - -EXPORTS - ComPlusPrepare - ComPlusCleanup - ComPlusInstallExecute - ComPlusInstallExecuteCommit - ComPlusRollbackInstallExecute - ComPlusUninstallExecute - ComPlusRollbackUninstallExecute diff --git a/src/ca/cppartexec.cpp b/src/ca/cppartexec.cpp index d8c30c6a..673bdaf9 100644 --- a/src/ca/cppartexec.cpp +++ b/src/ca/cppartexec.cpp @@ -399,7 +399,7 @@ static HRESULT CreatePartition( WcaLog(LOGMSG_VERBOSE, "Creating partition, key: %S", pAttrs->pwzKey); // get partitions collection - hr = CpiGetPartitionsCollection(&piPartColl); + hr = CpiExecGetPartitionsCollection(&piPartColl); ExitOnFailure(hr, "Failed to get partitions collection"); // check if partition exists @@ -456,7 +456,7 @@ static HRESULT RemovePartition( WcaLog(LOGMSG_VERBOSE, "Removing partition, key: %S", pAttrs->pwzKey); // get partitions collection - hr = CpiGetPartitionsCollection(&piPartColl); + hr = CpiExecGetPartitionsCollection(&piPartColl); ExitOnFailure(hr, "Failed to get partitions collection"); // remove diff --git a/src/ca/cppartsched.cpp b/src/ca/cppartsched.cpp index 6643a50b..7cd98791 100644 --- a/src/ca/cppartsched.cpp +++ b/src/ca/cppartsched.cpp @@ -199,7 +199,7 @@ HRESULT CpiPartitionsVerifyInstall( // get partitions collection if (!piPartColl) { - hr = CpiGetPartitionsCollection(&piPartColl); + hr = CpiSchedGetPartitionsCollection(&piPartColl); ExitOnFailure(hr, "Failed to get partitions collection"); } @@ -336,7 +336,7 @@ HRESULT CpiPartitionsVerifyUninstall( // get partitions collection if (!piPartColl) { - hr = CpiGetPartitionsCollection(&piPartColl); + hr = CpiSchedGetPartitionsCollection(&piPartColl); ExitOnFailure(hr, "Failed to get partitions collection"); } @@ -526,7 +526,7 @@ HRESULT CpiGetApplicationsCollForPartition( if (!pPart->piApplicationsColl) { // get partitions collection from catalog - hr = CpiGetPartitionsCollection(&piPartColl); + hr = CpiSchedGetPartitionsCollection(&piPartColl); ExitOnFailure(hr, "Failed to get partitions collection"); // find application object @@ -540,7 +540,7 @@ HRESULT CpiGetApplicationsCollForPartition( } // get roles collection - hr = CpiGetCatalogCollection(piPartColl, piPartObj, L"Applications", &pPart->piApplicationsColl); + hr = CpiSchedGetCatalogCollection(piPartColl, piPartObj, L"Applications", &pPart->piApplicationsColl); ExitOnFailure(hr, "Failed to get applications collection"); } @@ -576,7 +576,7 @@ HRESULT CpiGetRolesCollForPartition( if (!pPart->piRolesColl) { // get partitions collection from catalog - hr = CpiGetPartitionsCollection(&piPartColl); + hr = CpiSchedGetPartitionsCollection(&piPartColl); ExitOnFailure(hr, "Failed to get partitions collection"); // find partition object @@ -587,7 +587,7 @@ HRESULT CpiGetRolesCollForPartition( ExitFunction(); // exit with hr = S_FALSE // get roles collection - hr = CpiGetCatalogCollection(piPartColl, piPartObj, L"RolesForPartition", &pPart->piRolesColl); + hr = CpiSchedGetCatalogCollection(piPartColl, piPartObj, L"RolesForPartition", &pPart->piRolesColl); ExitOnFailure(hr, "Failed to get roles collection"); } diff --git a/src/ca/cpsched.cpp b/src/ca/cpsched.cpp index ac0dda59..ebc547ae 100644 --- a/src/ca/cpsched.cpp +++ b/src/ca/cpsched.cpp @@ -29,30 +29,6 @@ #define CP_COMPLUSINSTALLCOMMIT L"ComPlusInstallCommit" #endif - -/******************************************************************** - DllMain - standard entry point for all WiX CustomActions - -********************************************************************/ -extern "C" BOOL WINAPI DllMain( - IN HINSTANCE hInst, - IN ULONG ulReason, - IN LPVOID) -{ - switch(ulReason) - { - case DLL_PROCESS_ATTACH: - WcaGlobalInitialize(hInst); - break; - - case DLL_PROCESS_DETACH: - WcaGlobalFinalize(); - break; - } - - return TRUE; -} - /******************************************************************** ConfigureComPlusInstall - CUSTOM ACTION ENTRY POINT for installing COM+ components @@ -103,7 +79,7 @@ extern "C" UINT __stdcall ConfigureComPlusInstall(MSIHANDLE hInstall) ExitOnFailure(hr, "Failed to initialize COM"); fInitializedCom = TRUE; - CpiInitialize(); + CpiSchedInitialize(); // check for the prerequsite tables if (!CpiTableExists(cptComPlusPartition) && !CpiTableExists(cptComPlusApplication) && !CpiTableExists(cptComPlusAssembly)) @@ -114,7 +90,7 @@ extern "C" UINT __stdcall ConfigureComPlusInstall(MSIHANDLE hInstall) // make sure we can access the COM+ admin catalog do { - hr = CpiGetAdminCatalog(&piCatalog); + hr = CpiSchedGetAdminCatalog(&piCatalog); if (FAILED(hr)) { WcaLog(LOGMSG_STANDARD, "Failed to get COM+ admin catalog"); @@ -320,7 +296,7 @@ LExit: CpiSubscriptionListFree(&subList); // unitialize - CpiFinalize(); + CpiSchedFinalize(); if (fInitializedCom) ::CoUninitialize(); @@ -378,7 +354,7 @@ extern "C" UINT __stdcall ConfigureComPlusUninstall(MSIHANDLE hInstall) ExitOnFailure(hr, "Failed to initialize COM"); fInitializedCom = TRUE; - CpiInitialize(); + CpiSchedInitialize(); // check for the prerequsite tables if (!CpiTableExists(cptComPlusPartition) && !CpiTableExists(cptComPlusApplication) && !CpiTableExists(cptComPlusAssembly)) @@ -389,7 +365,7 @@ extern "C" UINT __stdcall ConfigureComPlusUninstall(MSIHANDLE hInstall) // make sure we can access the COM+ admin catalog do { - hr = CpiGetAdminCatalog(&piCatalog); + hr = CpiSchedGetAdminCatalog(&piCatalog); if (FAILED(hr)) { WcaLog(LOGMSG_STANDARD, "Failed to get COM+ admin catalog"); @@ -580,7 +556,7 @@ LExit: CpiSubscriptionListFree(&subList); // unitialize - CpiFinalize(); + CpiSchedFinalize(); if (fInitializedCom) ::CoUninitialize(); diff --git a/src/ca/cpsubssched.cpp b/src/ca/cpsubssched.cpp index 73fd4f6d..df15fd03 100644 --- a/src/ca/cpsubssched.cpp +++ b/src/ca/cpsubssched.cpp @@ -53,7 +53,7 @@ static HRESULT ComponentFindByKey( CPI_ASSEMBLY_LIST* pAsmList, LPCWSTR pwzKey, CPI_ASSEMBLY** ppAsmItm, - CPI_COMPONENT** ppCompItm + CPISCHED_COMPONENT** ppCompItm ); @@ -586,12 +586,12 @@ static HRESULT ComponentFindByKey( CPI_ASSEMBLY_LIST* pAsmList, LPCWSTR pwzKey, CPI_ASSEMBLY** ppAsmItm, - CPI_COMPONENT** ppCompItm + CPISCHED_COMPONENT** ppCompItm ) { for (CPI_ASSEMBLY* pAsmItm = pAsmList->pFirst; pAsmItm; pAsmItm = pAsmItm->pNext) { - for (CPI_COMPONENT* pCompItm = pAsmItm->pComponents; pCompItm; pCompItm = pCompItm->pNext) + for (CPISCHED_COMPONENT* pCompItm = pAsmItm->pComponents; pCompItm; pCompItm = pCompItm->pNext) { if (0 == lstrcmpW(pCompItm->wzKey, pwzKey)) { diff --git a/src/ca/cpsubssched.h b/src/ca/cpsubssched.h index 3fc18478..83ff1af8 100644 --- a/src/ca/cpsubssched.h +++ b/src/ca/cpsubssched.h @@ -18,7 +18,7 @@ struct CPI_SUBSCRIPTION INSTALLSTATE isInstalled, isAction; CPI_ASSEMBLY* pAssembly; - CPI_COMPONENT* pComponent; + CPISCHED_COMPONENT* pComponent; CPI_SUBSCRIPTION* pNext; }; diff --git a/src/ca/cputilexec.cpp b/src/ca/cputilexec.cpp index e081678b..1c2c8b93 100644 --- a/src/ca/cputilexec.cpp +++ b/src/ca/cputilexec.cpp @@ -69,13 +69,13 @@ static ICOMAdminCatalog* gpiCatalog; // function definitions -void CpiInitialize() +void CpiExecInitialize() { // collections gpiCatalog = NULL; } -void CpiFinalize() +void CpiExecFinalize() { // collections ReleaseObject(gpiCatalog); @@ -187,7 +187,7 @@ LExit: return hr; } -HRESULT CpiGetAdminCatalog( +HRESULT CpiExecGetAdminCatalog( ICOMAdminCatalog** ppiCatalog ) { @@ -225,11 +225,11 @@ HRESULT CpiLogCatalogErrorInfo() LPWSTR pwzMinorRef = NULL; // get catalog - hr = CpiGetAdminCatalog(&piCatalog); + hr = CpiExecGetAdminCatalog(&piCatalog); ExitOnFailure(hr, "Failed to get COM+ admin catalog"); // get error info collection - hr = CpiGetCatalogCollection(L"ErrorInfo", &piErrColl); + hr = CpiExecGetCatalogCollection(L"ErrorInfo", &piErrColl); ExitOnFailure(hr, "Failed to get error info collection"); // loop objects @@ -282,7 +282,7 @@ LExit: return hr; } -HRESULT CpiGetCatalogCollection( +HRESULT CpiExecGetCatalogCollection( LPCWSTR pwzName, ICatalogCollection** ppiColl ) @@ -299,7 +299,7 @@ HRESULT CpiGetCatalogCollection( ExitOnNull(bstrName, hr, E_OUTOFMEMORY, "Failed to allocate BSTR for collection name"); // get catalog - hr = CpiGetAdminCatalog(&piCatalog); + hr = CpiExecGetAdminCatalog(&piCatalog); ExitOnFailure(hr, "Failed to get COM+ admin catalog"); // get collecton from catalog @@ -326,7 +326,7 @@ LExit: return hr; } -HRESULT CpiGetCatalogCollection( +HRESULT CpiExecGetCatalogCollection( ICatalogCollection* piColl, ICatalogObject* piObj, LPCWSTR pwzName, @@ -348,7 +348,7 @@ HRESULT CpiGetCatalogCollection( ExitOnNull(bstrName, hr, E_OUTOFMEMORY, "Failed to allocate BSTR for collection name"); // get catalog - hr = CpiGetAdminCatalog(&piCatalog); + hr = CpiExecGetAdminCatalog(&piCatalog); ExitOnFailure(hr, "Failed to get COM+ admin catalog"); // get key @@ -894,14 +894,14 @@ LExit: return hr; } -HRESULT CpiGetPartitionsCollection( +HRESULT CpiExecGetPartitionsCollection( ICatalogCollection** ppiPartColl ) { HRESULT hr = S_OK; // get collection - hr = CpiGetCatalogCollection(L"Partitions", ppiPartColl); + hr = CpiExecGetCatalogCollection(L"Partitions", ppiPartColl); ExitOnFailure(hr, "Failed to get catalog collection"); hr = S_OK; @@ -921,7 +921,7 @@ HRESULT CpiGetPartitionRolesCollection( ICatalogObject* piPartObj = NULL; // get partitions collection - hr = CpiGetPartitionsCollection(&piPartColl); + hr = CpiExecGetPartitionsCollection(&piPartColl); ExitOnFailure(hr, "Failed to get partitions collection"); if (S_FALSE == hr) @@ -935,7 +935,7 @@ HRESULT CpiGetPartitionRolesCollection( ExitFunction(); // partition not found, exit with hr = S_FALSE // get roles collection - hr = CpiGetCatalogCollection(piPartColl, piPartObj, L"RolesForPartition", ppiRolesColl); + hr = CpiExecGetCatalogCollection(piPartColl, piPartObj, L"RolesForPartition", ppiRolesColl); ExitOnFailure(hr, "Failed to get catalog collection"); hr = S_OK; @@ -974,7 +974,7 @@ HRESULT CpiGetUsersInPartitionRoleCollection( ExitFunction(); // user not found, exit with hr = S_FALSE // get roles collection - hr = CpiGetCatalogCollection(piRoleColl, piRoleObj, L"UsersInPartitionRole", ppiUsrInRoleColl); + hr = CpiExecGetCatalogCollection(piRoleColl, piRoleObj, L"UsersInPartitionRole", ppiUsrInRoleColl); ExitOnFailure(hr, "Failed to get catalog collection"); hr = S_OK; @@ -994,7 +994,7 @@ HRESULT CpiGetPartitionUsersCollection( HRESULT hr = S_OK; // get roles collection - hr = CpiGetCatalogCollection(L"PartitionUsers", ppiUserColl); + hr = CpiExecGetCatalogCollection(L"PartitionUsers", ppiUserColl); ExitOnFailure(hr, "Failed to get catalog collection"); hr = S_OK; @@ -1003,7 +1003,7 @@ LExit: return hr; } -HRESULT CpiGetApplicationsCollection( +HRESULT CpiExecGetApplicationsCollection( LPCWSTR pwzPartID, ICatalogCollection** ppiAppColl ) @@ -1018,7 +1018,7 @@ HRESULT CpiGetApplicationsCollection( ICatalogObject* piPartObj = NULL; // get catalog - hr = CpiGetAdminCatalog(&piCatalog); + hr = CpiExecGetAdminCatalog(&piCatalog); ExitOnFailure(hr, "Failed to get COM+ admin catalog"); // get ICOMAdminCatalog2 interface @@ -1038,7 +1038,7 @@ HRESULT CpiGetApplicationsCollection( } // get partitions collection - hr = CpiGetPartitionsCollection(&piPartColl); + hr = CpiExecGetPartitionsCollection(&piPartColl); ExitOnFailure(hr, "Failed to get partitions collection"); // find object @@ -1049,7 +1049,7 @@ HRESULT CpiGetApplicationsCollection( ExitFunction(); // partition not found, exit with hr = S_FALSE // get applications collection - hr = CpiGetCatalogCollection(piPartColl, piPartObj, L"Applications", ppiAppColl); + hr = CpiExecGetCatalogCollection(piPartColl, piPartObj, L"Applications", ppiAppColl); ExitOnFailure(hr, "Failed to get catalog collection for partition"); } @@ -1061,7 +1061,7 @@ HRESULT CpiGetApplicationsCollection( ExitOnFailure(hr = E_FAIL, "Partitions are not supported by this version of COM+"); // get applications collection - hr = CpiGetCatalogCollection(L"Applications", ppiAppColl); + hr = CpiExecGetCatalogCollection(L"Applications", ppiAppColl); ExitOnFailure(hr, "Failed to get catalog collection"); } @@ -1091,7 +1091,7 @@ HRESULT CpiGetRolesCollection( ICatalogObject* piAppObj = NULL; // get applications collection - hr = CpiGetApplicationsCollection(pwzPartID, &piAppColl); + hr = CpiExecGetApplicationsCollection(pwzPartID, &piAppColl); ExitOnFailure(hr, "Failed to get applications collection"); if (S_FALSE == hr) @@ -1105,7 +1105,7 @@ HRESULT CpiGetRolesCollection( ExitFunction(); // application not found, exit with hr = S_FALSE // get roles collection - hr = CpiGetCatalogCollection(piAppColl, piAppObj, L"Roles", ppiRolesColl); + hr = CpiExecGetCatalogCollection(piAppColl, piAppObj, L"Roles", ppiRolesColl); ExitOnFailure(hr, "Failed to catalog collection"); hr = S_OK; @@ -1145,7 +1145,7 @@ HRESULT CpiGetUsersInRoleCollection( ExitFunction(); // role not found, exit with hr = S_FALSE // get roles collection - hr = CpiGetCatalogCollection(piRoleColl, piRoleObj, L"UsersInRole", ppiUsrInRoleColl); + hr = CpiExecGetCatalogCollection(piRoleColl, piRoleObj, L"UsersInRole", ppiUsrInRoleColl); ExitOnFailure(hr, "Failed to get catalog collection"); hr = S_OK; @@ -1170,7 +1170,7 @@ HRESULT CpiGetComponentsCollection( ICatalogObject* piAppObj = NULL; // get applications collection - hr = CpiGetApplicationsCollection(pwzPartID, &piAppColl); + hr = CpiExecGetApplicationsCollection(pwzPartID, &piAppColl); ExitOnFailure(hr, "Failed to get applications collection"); if (S_FALSE == hr) @@ -1184,7 +1184,7 @@ HRESULT CpiGetComponentsCollection( ExitFunction(); // application not found, exit with hr = S_FALSE // get components collection - hr = CpiGetCatalogCollection(piAppColl, piAppObj, L"Components", ppiCompsColl); + hr = CpiExecGetCatalogCollection(piAppColl, piAppObj, L"Components", ppiCompsColl); ExitOnFailure(hr, "Failed to get catalog collection"); hr = S_OK; @@ -1206,7 +1206,7 @@ HRESULT CpiGetInterfacesCollection( HRESULT hr = S_OK; // get interfaces collection - hr = CpiGetCatalogCollection(piCompColl, piCompObj, L"InterfacesForComponent", ppiIntfColl); + hr = CpiExecGetCatalogCollection(piCompColl, piCompObj, L"InterfacesForComponent", ppiIntfColl); ExitOnFailure(hr, "Failed to get catalog collection"); hr = S_OK; @@ -1224,7 +1224,7 @@ HRESULT CpiGetMethodsCollection( HRESULT hr = S_OK; // get interfaces collection - hr = CpiGetCatalogCollection(piIntfColl, piIntfObj, L"MethodsForInterface", ppiMethColl); + hr = CpiExecGetCatalogCollection(piIntfColl, piIntfObj, L"MethodsForInterface", ppiMethColl); ExitOnFailure(hr, "Failed to get catalog collection"); hr = S_OK; @@ -1260,7 +1260,7 @@ HRESULT CpiGetSubscriptionsCollection( ExitFunction(); // component not found, exit with hr = S_FALSE // get subscriptions collection - hr = CpiGetCatalogCollection(piCompColl, piCompObj, L"SubscriptionsForComponent", ppiSubsColl); + hr = CpiExecGetCatalogCollection(piCompColl, piCompObj, L"SubscriptionsForComponent", ppiSubsColl); ExitOnFailure(hr, "Failed to get catalog collection"); hr = S_OK; diff --git a/src/ca/cputilexec.h b/src/ca/cputilexec.h index 51b47583..b900883d 100644 --- a/src/ca/cputilexec.h +++ b/src/ca/cputilexec.h @@ -28,8 +28,8 @@ struct CPI_ROLLBACK_DATA // function prototypes -void CpiInitialize(); -void CpiFinalize(); +void CpiExecInitialize(); +void CpiExecFinalize(); HRESULT CpiActionStartMessage( LPWSTR* ppwzActionData, BOOL fSuppress @@ -38,15 +38,15 @@ HRESULT CpiActionDataMessage( DWORD cArgs, ... ); -HRESULT CpiGetAdminCatalog( +HRESULT CpiExecGetAdminCatalog( ICOMAdminCatalog** ppiCatalog ); HRESULT CpiLogCatalogErrorInfo(); -HRESULT CpiGetCatalogCollection( +HRESULT CpiExecGetCatalogCollection( LPCWSTR pwzName, ICatalogCollection** ppiColl ); -HRESULT CpiGetCatalogCollection( +HRESULT CpiExecGetCatalogCollection( ICatalogCollection* piColl, ICatalogObject* piObj, LPCWSTR pwzName, @@ -105,7 +105,7 @@ HRESULT CpiFindUserCollectionObject( PSID pSid, ICatalogObject** ppiObj ); -HRESULT CpiGetPartitionsCollection( +HRESULT CpiExecGetPartitionsCollection( ICatalogCollection** ppiPartColl ); HRESULT CpiGetPartitionRolesCollection( @@ -120,7 +120,7 @@ HRESULT CpiGetUsersInPartitionRoleCollection( HRESULT CpiGetPartitionUsersCollection( ICatalogCollection** ppiUserColl ); -HRESULT CpiGetApplicationsCollection( +HRESULT CpiExecGetApplicationsCollection( LPCWSTR pwzPartID, ICatalogCollection** ppiAppColl ); diff --git a/src/ca/cputilsched.cpp b/src/ca/cputilsched.cpp index 9dbe21ec..1a958c56 100644 --- a/src/ca/cputilsched.cpp +++ b/src/ca/cputilsched.cpp @@ -43,7 +43,7 @@ static int giTables; // function definitions -void CpiInitialize() +void CpiSchedInitialize() { // collections gpiCatalog = NULL; @@ -80,7 +80,7 @@ void CpiInitialize() if (S_OK == WcaTableExists(L"ComPlusSubscriptionProperty")) giTables |= cptComPlusSubscriptionProperty; } -void CpiFinalize() +void CpiSchedFinalize() { // collections ReleaseObject(gpiCatalog); @@ -95,7 +95,7 @@ BOOL CpiTableExists( return (giTables & iTable) == iTable; } -HRESULT CpiGetAdminCatalog( +HRESULT CpiSchedGetAdminCatalog( ICOMAdminCatalog** ppiCatalog ) { @@ -118,7 +118,7 @@ LExit: return hr; } -HRESULT CpiGetCatalogCollection( +HRESULT CpiSchedGetCatalogCollection( LPCWSTR pwzName, ICatalogCollection** ppiColl ) @@ -134,7 +134,7 @@ HRESULT CpiGetCatalogCollection( ExitOnNull(bstrName, hr, E_OUTOFMEMORY, "Failed to allocate BSTR for collection name"); // get catalog - hr = CpiGetAdminCatalog(&piCatalog); + hr = CpiSchedGetAdminCatalog(&piCatalog); ExitOnFailure(hr, "Failed to get COM+ admin catalog"); // get collecton from catalog @@ -159,7 +159,7 @@ LExit: return hr; } -HRESULT CpiGetCatalogCollection( +HRESULT CpiSchedGetCatalogCollection( ICatalogCollection* piColl, ICatalogObject* piObj, LPCWSTR pwzName, @@ -180,7 +180,7 @@ HRESULT CpiGetCatalogCollection( ExitOnNull(bstrName, hr, E_OUTOFMEMORY, "Failed to allocate BSTR for collection name"); // get catalog - hr = CpiGetAdminCatalog(&piCatalog); + hr = CpiSchedGetAdminCatalog(&piCatalog); ExitOnFailure(hr, "Failed to get COM+ admin catalog"); // get key @@ -331,7 +331,7 @@ LExit: return hr; } -HRESULT CpiGetPartitionsCollection( +HRESULT CpiSchedGetPartitionsCollection( ICatalogCollection** ppiPartColl ) { @@ -340,7 +340,7 @@ HRESULT CpiGetPartitionsCollection( if (!gpiPartColl) { // get collection - hr = CpiGetCatalogCollection(L"Partitions", &gpiPartColl); + hr = CpiSchedGetCatalogCollection(L"Partitions", &gpiPartColl); ExitOnFailure(hr, "Failed to get partitions collection"); } @@ -354,7 +354,7 @@ LExit: return hr; } -HRESULT CpiGetApplicationsCollection( +HRESULT CpiSchedGetApplicationsCollection( ICatalogCollection** ppiAppColl ) { @@ -369,7 +369,7 @@ HRESULT CpiGetApplicationsCollection( if (!gpiAppColl) { // get catalog - hr = CpiGetAdminCatalog(&piCatalog); + hr = CpiSchedGetAdminCatalog(&piCatalog); ExitOnFailure(hr, "Failed to get COM+ admin catalog"); // get ICOMAdminCatalog2 interface @@ -385,7 +385,7 @@ HRESULT CpiGetApplicationsCollection( ExitOnFailure(hr, "Failed to get global partition id"); // get partitions collection - hr = CpiGetPartitionsCollection(&piPartColl); + hr = CpiSchedGetPartitionsCollection(&piPartColl); ExitOnFailure(hr, "Failed to get partitions collection"); // find object @@ -396,7 +396,7 @@ HRESULT CpiGetApplicationsCollection( ExitFunction(); // partition not found, exit with hr = S_FALSE // get applications collection - hr = CpiGetCatalogCollection(piPartColl, piPartObj, L"Applications", &gpiAppColl); + hr = CpiSchedGetCatalogCollection(piPartColl, piPartObj, L"Applications", &gpiAppColl); ExitOnFailure(hr, "Failed to get applications collection"); } @@ -404,7 +404,7 @@ HRESULT CpiGetApplicationsCollection( else { // get applications collection - hr = CpiGetCatalogCollection(L"Applications", &gpiAppColl); + hr = CpiSchedGetCatalogCollection(L"Applications", &gpiAppColl); ExitOnFailure(hr, "Failed to get applications collection"); } } diff --git a/src/ca/cputilsched.h b/src/ca/cputilsched.h index 61aaab84..1f315576 100644 --- a/src/ca/cputilsched.h +++ b/src/ca/cputilsched.h @@ -2,12 +2,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. -#define CPI_MAX_GUID 38 - enum eRunMode { rmDeferred = 1, rmCommit, rmRollback }; -enum eActionType { atNoOp = 0, atCreate, atRemove }; - enum eComPlusPropertyType { cpptNone = 0, cpptBoolean, cpptInteger, cpptString, cpptUser }; enum eComPlusTables @@ -42,14 +38,6 @@ enum eComPlusTables // structs -struct CPI_PROPERTY -{ - WCHAR wzName[MAX_DARWIN_KEY + 1]; - LPWSTR pwzValue; - - CPI_PROPERTY* pNext; -}; - struct CPI_PROPERTY_DEFINITION { LPCWSTR pwzName; @@ -60,19 +48,19 @@ struct CPI_PROPERTY_DEFINITION // function prototypes -void CpiInitialize(); -void CpiFinalize(); +void CpiSchedInitialize(); +void CpiSchedFinalize(); BOOL CpiTableExists( int iTable ); -HRESULT CpiGetAdminCatalog( +HRESULT CpiSchedGetAdminCatalog( ICOMAdminCatalog** ppiCatalog ); -HRESULT CpiGetCatalogCollection( +HRESULT CpiSchedGetCatalogCollection( LPCWSTR pwzName, ICatalogCollection** ppiColl ); -HRESULT CpiGetCatalogCollection( +HRESULT CpiSchedGetCatalogCollection( ICatalogCollection* piColl, ICatalogObject* piObj, LPCWSTR pwzName, @@ -89,10 +77,10 @@ HRESULT CpiFindCollectionObject( LPCWSTR pwzName, ICatalogObject** ppiObj ); -HRESULT CpiGetPartitionsCollection( +HRESULT CpiSchedGetPartitionsCollection( ICatalogCollection** ppiPartColl ); -HRESULT CpiGetApplicationsCollection( +HRESULT CpiSchedGetApplicationsCollection( ICatalogCollection** ppiAppColl ); HRESULT CpiAddActionTextToActionData( diff --git a/src/ca/custommsierrors.h b/src/ca/custommsierrors.h new file mode 100644 index 00000000..219df698 --- /dev/null +++ b/src/ca/custommsierrors.h @@ -0,0 +1,29 @@ +#pragma once +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + + +#define msierrComPlusCannotConnect 28001 +#define msierrComPlusPartitionReadFailed 28002 +#define msierrComPlusPartitionRoleReadFailed 28003 +#define msierrComPlusUserInPartitionRoleReadFailed 28004 +#define msierrComPlusPartitionUserReadFailed 28005 +#define msierrComPlusApplicationReadFailed 28006 +#define msierrComPlusApplicationRoleReadFailed 28007 +#define msierrComPlusUserInApplicationRoleReadFailed 28008 +#define msierrComPlusAssembliesReadFailed 28009 +#define msierrComPlusSubscriptionReadFailed 28010 +#define msierrComPlusPartitionDependency 28011 +#define msierrComPlusPartitionNotFound 28012 +#define msierrComPlusPartitionIdConflict 28013 +#define msierrComPlusPartitionNameConflict 28014 +#define msierrComPlusApplicationDependency 28015 +#define msierrComPlusApplicationNotFound 28016 +#define msierrComPlusApplicationIdConflict 28017 +#define msierrComPlusApplicationNameConflict 28018 +#define msierrComPlusApplicationRoleDependency 28019 +#define msierrComPlusApplicationRoleNotFound 28020 +#define msierrComPlusApplicationRoleConflict 28021 +#define msierrComPlusAssemblyDependency 28022 +#define msierrComPlusSubscriptionIdConflict 28023 +#define msierrComPlusSubscriptionNameConflict 28024 +#define msierrComPlusFailedLookupNames 28025 diff --git a/src/ca/dllmain.cpp b/src/ca/dllmain.cpp new file mode 100644 index 00000000..7d299feb --- /dev/null +++ b/src/ca/dllmain.cpp @@ -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. + +#include "precomp.h" + +/******************************************************************** +DllMain - standard entry point for all WiX custom actions. + +********************************************************************/ +extern "C" BOOL WINAPI DllMain( + IN HINSTANCE hInstance, + IN ULONG ulReason, + IN LPVOID) +{ + switch(ulReason) + { + case DLL_PROCESS_ATTACH: + WcaGlobalInitialize(hInstance); + ::DisableThreadLibraryCalls(hInstance); + break; + + case DLL_PROCESS_DETACH: + WcaGlobalFinalize(); + break; + } + + return TRUE; +} diff --git a/src/ca/packages.config b/src/ca/packages.config new file mode 100644 index 00000000..ab964d2c --- /dev/null +++ b/src/ca/packages.config @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/src/ca/precomp.h b/src/ca/precomp.h new file mode 100644 index 00000000..74c328d2 --- /dev/null +++ b/src/ca/precomp.h @@ -0,0 +1,33 @@ +#pragma once +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + + +#include +#include +#include +#include +#include +#include + +#include "wcautil.h" +#include "memutil.h" +#include "strutil.h" +#include "wiutil.h" + +#include "CustomMsiErrors.h" + +#include "cpcost.h" +#include "cputilexec.h" +#include "cppartexec.h" +#include "cppartroleexec.h" +#include "cpappexec.h" +#include "cpapproleexec.h" +#include "cpasmexec.h" +#include "cpsubsexec.h" +#include "cputilsched.h" +#include "cppartsched.h" +#include "cppartrolesched.h" +#include "cpappsched.h" +#include "cpapprolesched.h" +#include "cpasmsched.h" +#include "cpsubssched.h" diff --git a/src/test/WixToolsetTest.ComPlus/ComPlusExtensionFixture.cs b/src/test/WixToolsetTest.ComPlus/ComPlusExtensionFixture.cs new file mode 100644 index 00000000..4ff3b5f0 --- /dev/null +++ b/src/test/WixToolsetTest.ComPlus/ComPlusExtensionFixture.cs @@ -0,0 +1,32 @@ +// Copyright (c) .NET 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.ComPlus +{ + using System.Linq; + using WixBuildTools.TestSupport; + using WixToolset.Core.TestPackage; + using WixToolset.ComPlus; + using Xunit; + + public class ComPlusExtensionFixture + { + [Fact] + public void CanBuildUsingComPlusPartition() + { + var folder = TestData.Get(@"TestData\UsingComPlusPartition"); + var build = new Builder(folder, typeof(ComPlusExtensionFactory), new[] { folder }); + + var results = build.BuildAndQuery(Build, "ComPlusPartition"); + Assert.Equal(new[] + { + "ComPlusPartition:", + }, results.OrderBy(s => s).ToArray()); + } + + private static void Build(string[] args) + { + var result = WixRunner.Execute(args) + .AssertSuccess(); + } + } +} diff --git a/src/test/WixToolsetTest.ComPlus/TestData/UsingComPlusPartition/Package.en-us.wxl b/src/test/WixToolsetTest.ComPlus/TestData/UsingComPlusPartition/Package.en-us.wxl new file mode 100644 index 00000000..38c12ac1 --- /dev/null +++ b/src/test/WixToolsetTest.ComPlus/TestData/UsingComPlusPartition/Package.en-us.wxl @@ -0,0 +1,11 @@ + + + + + + A newer version of [ProductName] is already installed. + MsiPackage + + diff --git a/src/test/WixToolsetTest.ComPlus/TestData/UsingComPlusPartition/Package.wxs b/src/test/WixToolsetTest.ComPlus/TestData/UsingComPlusPartition/Package.wxs new file mode 100644 index 00000000..68ff98fd --- /dev/null +++ b/src/test/WixToolsetTest.ComPlus/TestData/UsingComPlusPartition/Package.wxs @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/test/WixToolsetTest.ComPlus/TestData/UsingComPlusPartition/PackageComponents.wxs b/src/test/WixToolsetTest.ComPlus/TestData/UsingComPlusPartition/PackageComponents.wxs new file mode 100644 index 00000000..f61eedd6 --- /dev/null +++ b/src/test/WixToolsetTest.ComPlus/TestData/UsingComPlusPartition/PackageComponents.wxs @@ -0,0 +1,12 @@ + + + + + + + + + + + diff --git a/src/test/WixToolsetTest.ComPlus/TestData/UsingComPlusPartition/example.txt b/src/test/WixToolsetTest.ComPlus/TestData/UsingComPlusPartition/example.txt new file mode 100644 index 00000000..1b4ffe8a --- /dev/null +++ b/src/test/WixToolsetTest.ComPlus/TestData/UsingComPlusPartition/example.txt @@ -0,0 +1 @@ +This is example.txt. \ No newline at end of file diff --git a/src/test/WixToolsetTest.ComPlus/WixToolsetTest.ComPlus.csproj b/src/test/WixToolsetTest.ComPlus/WixToolsetTest.ComPlus.csproj new file mode 100644 index 00000000..801f5ca2 --- /dev/null +++ b/src/test/WixToolsetTest.ComPlus/WixToolsetTest.ComPlus.csproj @@ -0,0 +1,38 @@ + + + + + + netcoreapp2.1 + false + + + + NU1701 + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/wixext/ComPlusCompiler.cs b/src/wixext/ComPlusCompiler.cs index 7f22c56b..4709eba9 100644 --- a/src/wixext/ComPlusCompiler.cs +++ b/src/wixext/ComPlusCompiler.cs @@ -1,31 +1,22 @@ // Copyright (c) .NET 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.Extensions +namespace WixToolset.ComPlus { using System; using System.Collections; using System.Collections.Generic; using System.Globalization; - using System.Reflection; - using System.Xml; + using System.Text; using System.Xml.Linq; - using System.Xml.Schema; using WixToolset.Data; using WixToolset.Extensibility; + using WixToolset.Extensibility.Data; /// - /// The compiler for the WiX Toolset Internet Information Services Extension. + /// The compiler for the WiX Toolset COM+ Extension. /// - public sealed class ComPlusCompiler : CompilerExtension + public sealed class ComPlusCompiler : BaseCompilerExtension { - /// - /// Instantiate a new ComPlusCompiler. - /// - public ComPlusCompiler() - { - this.Namespace = "http://wixtoolset.org/schemas/v4/wxs/complus"; - } - /// /// /// @@ -37,6 +28,8 @@ namespace WixToolset.Extensions RegisterInCommit = (1 << 3) } + public override XNamespace Namespace => "http://wixtoolset.org/schemas/v4/wxs/complus"; + /// /// Processes an element for the Compiler. /// @@ -44,7 +37,7 @@ namespace WixToolset.Extensions /// Parent element of element to process. /// Element to process. /// Extra information about the context in which this element is being parsed. - public override void ParseElement(XElement parentElement, XElement element, IDictionary context) + public override void ParseElement(Intermediate intermediate, IntermediateSection section, XElement parentElement, XElement element, IDictionary context) { switch (parentElement.Name.LocalName) { @@ -56,49 +49,49 @@ namespace WixToolset.Extensions switch (element.Name.LocalName) { case "ComPlusPartition": - this.ParseComPlusPartitionElement(element, componentId, win64); + this.ParseComPlusPartitionElement(intermediate, section, element, componentId, win64); break; case "ComPlusPartitionRole": - this.ParseComPlusPartitionRoleElement(element, componentId, null); + this.ParseComPlusPartitionRoleElement(intermediate, section, element, componentId, null); break; case "ComPlusUserInPartitionRole": - this.ParseComPlusUserInPartitionRoleElement(element, componentId, null); + this.ParseComPlusUserInPartitionRoleElement(intermediate, section, element, componentId, null); break; case "ComPlusGroupInPartitionRole": - this.ParseComPlusGroupInPartitionRoleElement(element, componentId, null); + this.ParseComPlusGroupInPartitionRoleElement(intermediate, section, element, componentId, null); break; case "ComPlusPartitionUser": - this.ParseComPlusPartitionUserElement(element, componentId, null); + this.ParseComPlusPartitionUserElement(intermediate, section, element, componentId, null); break; case "ComPlusApplication": - this.ParseComPlusApplicationElement(element, componentId, win64, null); + this.ParseComPlusApplicationElement(intermediate, section, element, componentId, win64, null); break; case "ComPlusApplicationRole": - this.ParseComPlusApplicationRoleElement(element, componentId, null); + this.ParseComPlusApplicationRoleElement(intermediate, section, element, componentId, null); break; case "ComPlusUserInApplicationRole": - this.ParseComPlusUserInApplicationRoleElement(element, componentId, null); + this.ParseComPlusUserInApplicationRoleElement(intermediate, section, element, componentId, null); break; case "ComPlusGroupInApplicationRole": - this.ParseComPlusGroupInApplicationRoleElement(element, componentId, null); + this.ParseComPlusGroupInApplicationRoleElement(intermediate, section, element, componentId, null); break; case "ComPlusAssembly": - this.ParseComPlusAssemblyElement(element, componentId, win64, null); + this.ParseComPlusAssemblyElement(intermediate, section, element, componentId, win64, null); break; case "ComPlusRoleForComponent": - this.ParseComPlusRoleForComponentElement(element, componentId, null); + this.ParseComPlusRoleForComponentElement(intermediate, section, element, componentId, null); break; case "ComPlusRoleForInterface": - this.ParseComPlusRoleForInterfaceElement(element, componentId, null); + this.ParseComPlusRoleForInterfaceElement(intermediate, section, element, componentId, null); break; case "ComPlusRoleForMethod": - this.ParseComPlusRoleForMethodElement(element, componentId, null); + this.ParseComPlusRoleForMethodElement(intermediate, section, element, componentId, null); break; case "ComPlusSubscription": - this.ParseComPlusSubscriptionElement(element, componentId, null); + this.ParseComPlusSubscriptionElement(intermediate, section, element, componentId, null); break; default: - this.Core.UnexpectedElement(parentElement, element); + this.ParseHelper.UnexpectedElement(parentElement, element); break; } break; @@ -108,24 +101,24 @@ namespace WixToolset.Extensions switch (element.Name.LocalName) { case "ComPlusPartition": - this.ParseComPlusPartitionElement(element, null, false); + this.ParseComPlusPartitionElement(intermediate, section, element, null, false); break; case "ComPlusPartitionRole": - this.ParseComPlusPartitionRoleElement(element, null, null); + this.ParseComPlusPartitionRoleElement(intermediate, section, element, null, null); break; case "ComPlusApplication": - this.ParseComPlusApplicationElement(element, null, false, null); + this.ParseComPlusApplicationElement(intermediate, section, element, null, false, null); break; case "ComPlusApplicationRole": - this.ParseComPlusApplicationRoleElement(element, null, null); + this.ParseComPlusApplicationRoleElement(intermediate, section, element, null, null); break; default: - this.Core.UnexpectedElement(parentElement, element); + this.ParseHelper.UnexpectedElement(parentElement, element); break; } break; default: - this.Core.UnexpectedElement(parentElement, element); + this.ParseHelper.UnexpectedElement(parentElement, element); break; } } @@ -135,9 +128,9 @@ namespace WixToolset.Extensions /// /// Element to parse. /// Identifier of parent component. - private void ParseComPlusPartitionElement(XElement node, string componentKey, bool win64) + private void ParseComPlusPartitionElement(Intermediate intermediate, IntermediateSection section, XElement node, string componentKey, bool win64) { - SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); + SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node); string key = null; string id = null; @@ -152,49 +145,49 @@ namespace WixToolset.Extensions switch (attrib.Name.LocalName) { case "Id": - key = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); + key = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); break; case "PartitionId": - id = TryFormatGuidValue(this.Core.GetAttributeValue(sourceLineNumbers, attrib)); + id = this.TryFormatGuidValue(this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib)); break; case "Name": - name = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + name = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); break; case "Changeable": - this.Core.OnMessage(WixWarnings.DeprecatedAttribute(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); + this.Messaging.Write(WarningMessages.DeprecatedAttribute(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); break; case "Deleteable": if (null == componentKey) { - this.Core.OnMessage(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); + this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); } - properties["Deleteable"] = YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; + properties["Deleteable"] = YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; break; case "Description": if (null == componentKey) { - this.Core.OnMessage(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); + this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); } - properties["Description"] = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + properties["Description"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); break; default: - this.Core.UnexpectedAttribute(node, attrib); + this.ParseHelper.UnexpectedAttribute(node, attrib); break; } } else { - this.Core.ParseExtensionAttribute(node, attrib); + this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, node, attrib); } } if (null != componentKey && null == name) { - this.Core.OnMessage(ComPlusErrors.RequiredAttributeUnderComponent(sourceLineNumbers, node.Name.LocalName, "Name")); + this.Messaging.Write(ComPlusErrors.RequiredAttributeUnderComponent(sourceLineNumbers, node.Name.LocalName, "Name")); } if (null == componentKey && null == id && null == name) { - this.Core.OnMessage(ComPlusErrors.RequiredAttributeNotUnderComponent(sourceLineNumbers, node.Name.LocalName, "Id", "Name")); + this.Messaging.Write(ComPlusErrors.RequiredAttributeNotUnderComponent(sourceLineNumbers, node.Name.LocalName, "Id", "Name")); } foreach (XElement child in node.Elements()) @@ -204,58 +197,58 @@ namespace WixToolset.Extensions switch (child.Name.LocalName) { case "ComPlusPartitionRole": - this.ParseComPlusPartitionRoleElement(child, componentKey, key); + this.ParseComPlusPartitionRoleElement(intermediate, section, child, componentKey, key); break; case "ComPlusPartitionUser": - this.ParseComPlusPartitionUserElement(child, componentKey, key); + this.ParseComPlusPartitionUserElement(intermediate, section, child, componentKey, key); break; case "ComPlusApplication": - this.ParseComPlusApplicationElement(child, componentKey, win64, key); + this.ParseComPlusApplicationElement(intermediate, section, child, componentKey, win64, key); break; default: - this.Core.UnexpectedElement(node, child); + this.ParseHelper.UnexpectedElement(node, child); break; } } else { - this.Core.ParseExtensionElement(node, child); + this.ParseHelper.ParseExtensionElement(this.Context.Extensions, intermediate, section, node, child); } } - Row row = this.Core.CreateRow(sourceLineNumbers, "ComPlusPartition"); - row[0] = key; - row[1] = componentKey; - row[2] = id; - row[3] = name; + var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "ComPlusPartition"); + row.Set(0, key); + row.Set(1, componentKey); + row.Set(2, id); + row.Set(3, name); IDictionaryEnumerator propertiesEnumerator = properties.GetEnumerator(); while (propertiesEnumerator.MoveNext()) { - Row propertyRow = this.Core.CreateRow(sourceLineNumbers, "ComPlusPartitionProperty"); - propertyRow[0] = key; - propertyRow[1] = (string)propertiesEnumerator.Key; - propertyRow[2] = (string)propertiesEnumerator.Value; + var propertyRow = this.ParseHelper.CreateRow(section, sourceLineNumbers, "ComPlusPartitionProperty"); + propertyRow.Set(0, key); + propertyRow.Set(1, (string)propertiesEnumerator.Key); + propertyRow.Set(2, (string)propertiesEnumerator.Value); } if (componentKey != null) { if (win64) { - if (this.Core.CurrentPlatform == Platform.IA64) + if (this.Context.Platform == Platform.IA64) { - this.Core.OnMessage(WixErrors.UnsupportedPlatformForElement(sourceLineNumbers, "ia64", node.Name.LocalName)); + this.Messaging.Write(ErrorMessages.UnsupportedPlatformForElement(sourceLineNumbers, "ia64", node.Name.LocalName)); } else { - this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "ConfigureComPlusInstall_x64"); - this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "ConfigureComPlusUninstall_x64"); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "ConfigureComPlusInstall_x64"); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "ConfigureComPlusUninstall_x64"); } } else { - this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "ConfigureComPlusInstall"); - this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "ConfigureComPlusUninstall"); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "ConfigureComPlusInstall"); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "ConfigureComPlusUninstall"); } } } @@ -266,9 +259,9 @@ namespace WixToolset.Extensions /// Element to parse. /// Identifier of parent component. /// Optional identifier of parent application. - private void ParseComPlusPartitionRoleElement(XElement node, string componentKey, string partitionKey) + private void ParseComPlusPartitionRoleElement(Intermediate intermediate, IntermediateSection section, XElement node, string componentKey, string partitionKey) { - SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); + SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node); string key = null; string name = null; @@ -280,33 +273,33 @@ namespace WixToolset.Extensions switch (attrib.Name.LocalName) { case "Id": - key = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); + key = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); break; case "Partition": if (null != partitionKey) { - this.Core.OnMessage(WixErrors.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, node.Parent.Name.LocalName)); + this.Messaging.Write(ErrorMessages.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, node.Parent.Name.LocalName)); } - partitionKey = this.Core.GetAttributeValue(sourceLineNumbers, attrib); - this.Core.CreateSimpleReference(sourceLineNumbers, "ComPlusPartition", partitionKey); + partitionKey = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "ComPlusPartition", partitionKey); break; case "Name": - name = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + name = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); break; default: - this.Core.UnexpectedAttribute(node, attrib); + this.ParseHelper.UnexpectedAttribute(node, attrib); break; } } else { - this.Core.ParseExtensionAttribute(node, attrib); + this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, node, attrib); } } if (null == partitionKey) { - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Partition")); + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Partition")); } foreach (XElement child in node.Elements()) @@ -316,27 +309,27 @@ namespace WixToolset.Extensions switch (child.Name.LocalName) { case "ComPlusUserInPartitionRole": - this.ParseComPlusUserInPartitionRoleElement(child, componentKey, key); + this.ParseComPlusUserInPartitionRoleElement(intermediate, section, child, componentKey, key); break; case "ComPlusGroupInPartitionRole": - this.ParseComPlusGroupInPartitionRoleElement(child, componentKey, key); + this.ParseComPlusGroupInPartitionRoleElement(intermediate, section, child, componentKey, key); break; default: - this.Core.UnexpectedElement(node, child); + this.ParseHelper.UnexpectedElement(node, child); break; } } else { - this.Core.ParseExtensionElement(node, child); + this.ParseHelper.ParseExtensionElement(this.Context.Extensions, intermediate, section, node, child); } } // add table row - Row row = this.Core.CreateRow(sourceLineNumbers, "ComPlusPartitionRole"); - row[0] = key; - row[1] = partitionKey; - row[3] = name; + var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "ComPlusPartitionRole"); + row.Set(0, key); + row.Set(1, partitionKey); + row.Set(3, name); } /// @@ -345,9 +338,9 @@ namespace WixToolset.Extensions /// Element to parse. /// Identifier of parent component. /// Optional identifier of parent application role. - private void ParseComPlusUserInPartitionRoleElement(XElement node, string componentKey, string partitionRoleKey) + private void ParseComPlusUserInPartitionRoleElement(Intermediate intermediate, IntermediateSection section, XElement node, string componentKey, string partitionRoleKey) { - SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); + SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node); string key = null; string user = null; @@ -359,41 +352,41 @@ namespace WixToolset.Extensions switch (attrib.Name.LocalName) { case "Id": - key = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); + key = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); break; case "PartitionRole": if (null != partitionRoleKey) { - this.Core.OnMessage(WixErrors.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, node.Parent.Name.LocalName)); + this.Messaging.Write(ErrorMessages.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, node.Parent.Name.LocalName)); } - partitionRoleKey = this.Core.GetAttributeValue(sourceLineNumbers, attrib); - this.Core.CreateSimpleReference(sourceLineNumbers, "ComPlusPartitionRole", partitionRoleKey); + partitionRoleKey = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "ComPlusPartitionRole", partitionRoleKey); break; case "User": - user = this.Core.GetAttributeValue(sourceLineNumbers, attrib); - this.Core.CreateSimpleReference(sourceLineNumbers, "User", user); + user = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "User", user); break; default: - this.Core.UnexpectedAttribute(node, attrib); + this.ParseHelper.UnexpectedAttribute(node, attrib); break; } } else { - this.Core.ParseExtensionAttribute(node, attrib); + this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, node, attrib); } } if (null == partitionRoleKey) { - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "PartitionRole")); + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "PartitionRole")); } - Row row = this.Core.CreateRow(sourceLineNumbers, "ComPlusUserInPartitionRole"); - row[0] = key; - row[1] = partitionRoleKey; - row[2] = componentKey; - row[3] = user; + var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "ComPlusUserInPartitionRole"); + row.Set(0, key); + row.Set(1, partitionRoleKey); + row.Set(2, componentKey); + row.Set(3, user); } /// @@ -402,9 +395,9 @@ namespace WixToolset.Extensions /// Element to parse. /// Identifier of parent component. /// Optional identifier of parent application role. - private void ParseComPlusGroupInPartitionRoleElement(XElement node, string componentKey, string partitionRoleKey) + private void ParseComPlusGroupInPartitionRoleElement(Intermediate intermediate, IntermediateSection section, XElement node, string componentKey, string partitionRoleKey) { - SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); + SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node); string key = null; string group = null; @@ -416,41 +409,41 @@ namespace WixToolset.Extensions switch (attrib.Name.LocalName) { case "Id": - key = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); + key = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); break; case "PartitionRole": if (null != partitionRoleKey) { - this.Core.OnMessage(WixErrors.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, node.Parent.Name.LocalName)); + this.Messaging.Write(ErrorMessages.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, node.Parent.Name.LocalName)); } - partitionRoleKey = this.Core.GetAttributeValue(sourceLineNumbers, attrib); - this.Core.CreateSimpleReference(sourceLineNumbers, "ComPlusPartitionRole", partitionRoleKey); + partitionRoleKey = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "ComPlusPartitionRole", partitionRoleKey); break; case "Group": - group = this.Core.GetAttributeValue(sourceLineNumbers, attrib); - this.Core.CreateSimpleReference(sourceLineNumbers, "Group", group); + group = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "Group", group); break; default: - this.Core.UnexpectedAttribute(node, attrib); + this.ParseHelper.UnexpectedAttribute(node, attrib); break; } } else { - this.Core.ParseExtensionAttribute(node, attrib); + this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, node, attrib); } } if (null == partitionRoleKey) { - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "PartitionRole")); + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "PartitionRole")); } - Row row = this.Core.CreateRow(sourceLineNumbers, "ComPlusGroupInPartitionRole"); - row[0] = key; - row[1] = partitionRoleKey; - row[2] = componentKey; - row[3] = group; + var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "ComPlusGroupInPartitionRole"); + row.Set(0, key); + row.Set(1, partitionRoleKey); + row.Set(2, componentKey); + row.Set(3, group); } /// @@ -458,9 +451,9 @@ namespace WixToolset.Extensions /// /// Element to parse. /// Identifier of parent component. - private void ParseComPlusPartitionUserElement(XElement node, string componentKey, string partitionKey) + private void ParseComPlusPartitionUserElement(Intermediate intermediate, IntermediateSection section, XElement node, string componentKey, string partitionKey) { - SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); + SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node); string key = null; string user = null; @@ -472,41 +465,41 @@ namespace WixToolset.Extensions switch (attrib.Name.LocalName) { case "Id": - key = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); + key = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); break; case "Partition": if (null != partitionKey) { - this.Core.OnMessage(WixErrors.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, node.Parent.Name.LocalName)); + this.Messaging.Write(ErrorMessages.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, node.Parent.Name.LocalName)); } - partitionKey = this.Core.GetAttributeValue(sourceLineNumbers, attrib); - this.Core.CreateSimpleReference(sourceLineNumbers, "ComPlusPartition", partitionKey); + partitionKey = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "ComPlusPartition", partitionKey); break; case "User": - user = this.Core.GetAttributeValue(sourceLineNumbers, attrib); - this.Core.CreateSimpleReference(sourceLineNumbers, "User", user); + user = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "User", user); break; default: - this.Core.UnexpectedAttribute(node, attrib); + this.ParseHelper.UnexpectedAttribute(node, attrib); break; } } else { - this.Core.ParseExtensionAttribute(node, attrib); + this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, node, attrib); } } if (null == partitionKey) { - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Partition")); + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Partition")); } - Row row = this.Core.CreateRow(sourceLineNumbers, "ComPlusPartitionUser"); - row[0] = key; - row[1] = partitionKey; - row[2] = componentKey; - row[3] = user; + var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "ComPlusPartitionUser"); + row.Set(0, key); + row.Set(1, partitionKey); + row.Set(2, componentKey); + row.Set(3, user); } /// @@ -515,9 +508,9 @@ namespace WixToolset.Extensions /// Element to parse. /// Identifier of parent component. /// Optional identifier of parent partition. - private void ParseComPlusApplicationElement(XElement node, string componentKey, bool win64, string partitionKey) + private void ParseComPlusApplicationElement(Intermediate intermediate, IntermediateSection section, XElement node, string componentKey, bool win64, string partitionKey) { - SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); + SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node); string key = null; string id = null; @@ -532,35 +525,35 @@ namespace WixToolset.Extensions switch (attrib.Name.LocalName) { case "Id": - key = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); + key = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); break; case "Partition": if (null != partitionKey) { - this.Core.OnMessage(WixErrors.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, node.Parent.Name.LocalName)); + this.Messaging.Write(ErrorMessages.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, node.Parent.Name.LocalName)); } - partitionKey = this.Core.GetAttributeValue(sourceLineNumbers, attrib); - this.Core.CreateSimpleReference(sourceLineNumbers, "ComPlusPartition", partitionKey); + partitionKey = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "ComPlusPartition", partitionKey); break; case "ApplicationId": - id = TryFormatGuidValue(this.Core.GetAttributeValue(sourceLineNumbers, attrib)); + id = this.TryFormatGuidValue(this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib)); break; case "Name": - name = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + name = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); break; case "ThreeGigSupportEnabled": if (null == componentKey) { - this.Core.OnMessage(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); + this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); } - properties["3GigSupportEnabled"] = YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; + properties["3GigSupportEnabled"] = YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; break; case "AccessChecksLevel": if (null == componentKey) { - this.Core.OnMessage(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); + this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); } - string accessChecksLevelValue = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + string accessChecksLevelValue = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); switch (accessChecksLevelValue) { case "applicationLevel": @@ -570,16 +563,16 @@ namespace WixToolset.Extensions properties["AccessChecksLevel"] = "1"; break; default: - this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, "ComPlusApplication", "AccessChecksLevel", accessChecksLevelValue, "applicationLevel", "applicationComponentLevel")); + this.Messaging.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, "ComPlusApplication", "AccessChecksLevel", accessChecksLevelValue, "applicationLevel", "applicationComponentLevel")); break; } break; case "Activation": if (null == componentKey) { - this.Core.OnMessage(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); + this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); } - string activationValue = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + string activationValue = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); switch (activationValue) { case "inproc": @@ -589,30 +582,30 @@ namespace WixToolset.Extensions properties["Activation"] = "Local"; break; default: - this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, "ComPlusApplication", "Activation", activationValue, "inproc", "local")); + this.Messaging.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, "ComPlusApplication", "Activation", activationValue, "inproc", "local")); break; } break; case "ApplicationAccessChecksEnabled": if (null == componentKey) { - this.Core.OnMessage(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); + this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); } - properties["ApplicationAccessChecksEnabled"] = YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; + properties["ApplicationAccessChecksEnabled"] = YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; break; case "ApplicationDirectory": if (null == componentKey) { - this.Core.OnMessage(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); + this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); } - properties["ApplicationDirectory"] = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + properties["ApplicationDirectory"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); break; case "Authentication": if (null == componentKey) { - this.Core.OnMessage(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); + this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); } - string authenticationValue = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + string authenticationValue = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); switch (authenticationValue) { case "default": @@ -637,16 +630,16 @@ namespace WixToolset.Extensions properties["Authentication"] = "6"; break; default: - this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, "ComPlusApplication", "Authentication", authenticationValue, "default", "none", "connect", "call", "packet", "integrity", "privacy")); + this.Messaging.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, "ComPlusApplication", "Authentication", authenticationValue, "default", "none", "connect", "call", "packet", "integrity", "privacy")); break; } break; case "AuthenticationCapability": if (null == componentKey) { - this.Core.OnMessage(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); + this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); } - string authenticationCapabilityValue = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + string authenticationCapabilityValue = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); switch (authenticationCapabilityValue) { case "none": @@ -662,110 +655,110 @@ namespace WixToolset.Extensions properties["AuthenticationCapability"] = "64"; break; default: - this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, "ComPlusApplication", "AuthenticationCapability", authenticationCapabilityValue, "none", "secureReference", "staticCloaking", "dynamicCloaking")); + this.Messaging.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, "ComPlusApplication", "AuthenticationCapability", authenticationCapabilityValue, "none", "secureReference", "staticCloaking", "dynamicCloaking")); break; } break; case "Changeable": - this.Core.OnMessage(WixWarnings.DeprecatedAttribute(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); + this.Messaging.Write(WarningMessages.DeprecatedAttribute(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); break; case "CommandLine": if (null == componentKey) { - this.Core.OnMessage(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); + this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); } - properties["CommandLine"] = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + properties["CommandLine"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); break; case "ConcurrentApps": if (null == componentKey) { - this.Core.OnMessage(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); + this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); } - properties["ConcurrentApps"] = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + properties["ConcurrentApps"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); break; case "CreatedBy": if (null == componentKey) { - this.Core.OnMessage(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); + this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); } - properties["CreatedBy"] = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + properties["CreatedBy"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); break; case "CRMEnabled": if (null == componentKey) { - this.Core.OnMessage(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); + this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); } - properties["CRMEnabled"] = YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; + properties["CRMEnabled"] = YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; break; case "CRMLogFile": if (null == componentKey) { - this.Core.OnMessage(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); + this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); } - properties["CRMLogFile"] = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + properties["CRMLogFile"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); break; case "Deleteable": if (null == componentKey) { - this.Core.OnMessage(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); + this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); } - properties["Deleteable"] = YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; + properties["Deleteable"] = YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; break; case "Description": if (null == componentKey) { - this.Core.OnMessage(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); + this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); } - properties["Description"] = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + properties["Description"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); break; case "DumpEnabled": if (null == componentKey) { - this.Core.OnMessage(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); + this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); } - properties["DumpEnabled"] = YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; + properties["DumpEnabled"] = YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; break; case "DumpOnException": if (null == componentKey) { - this.Core.OnMessage(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); + this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); } - properties["DumpOnException"] = YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; + properties["DumpOnException"] = YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; break; case "DumpOnFailfast": if (null == componentKey) { - this.Core.OnMessage(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); + this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); } - properties["DumpOnFailfast"] = YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; + properties["DumpOnFailfast"] = YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; break; case "DumpPath": if (null == componentKey) { - this.Core.OnMessage(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); + this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); } - properties["DumpPath"] = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + properties["DumpPath"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); break; case "EventsEnabled": if (null == componentKey) { - this.Core.OnMessage(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); + this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); } - properties["EventsEnabled"] = YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; + properties["EventsEnabled"] = YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; break; case "Identity": if (null == componentKey) { - this.Core.OnMessage(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); + this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); } - properties["Identity"] = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + properties["Identity"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); break; case "ImpersonationLevel": if (null == componentKey) { - this.Core.OnMessage(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); + this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); } - string impersonationLevelValue = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + string impersonationLevelValue = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); switch (impersonationLevelValue) { case "anonymous": @@ -781,37 +774,37 @@ namespace WixToolset.Extensions properties["ImpersonationLevel"] = "4"; break; default: - this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, "ComPlusApplication", "ImpersonationLevel", impersonationLevelValue, "anonymous", "identify", "impersonate", "delegate")); + this.Messaging.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, "ComPlusApplication", "ImpersonationLevel", impersonationLevelValue, "anonymous", "identify", "impersonate", "delegate")); break; } break; case "IsEnabled": if (null == componentKey) { - this.Core.OnMessage(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); + this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); } - properties["IsEnabled"] = YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; + properties["IsEnabled"] = YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; break; case "MaxDumpCount": if (null == componentKey) { - this.Core.OnMessage(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); + this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); } - properties["MaxDumpCount"] = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + properties["MaxDumpCount"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); break; case "Password": if (null == componentKey) { - this.Core.OnMessage(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); + this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); } - properties["Password"] = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + properties["Password"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); break; case "QCAuthenticateMsgs": if (null == componentKey) { - this.Core.OnMessage(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); + this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); } - string qcAuthenticateMsgsValue = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + string qcAuthenticateMsgsValue = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); switch (qcAuthenticateMsgsValue) { case "secureApps": @@ -824,128 +817,128 @@ namespace WixToolset.Extensions properties["QCAuthenticateMsgs"] = "2"; break; default: - this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, "ComPlusApplication", "QCAuthenticateMsgs", qcAuthenticateMsgsValue, "secureApps", "off", "on")); + this.Messaging.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, "ComPlusApplication", "QCAuthenticateMsgs", qcAuthenticateMsgsValue, "secureApps", "off", "on")); break; } break; case "QCListenerMaxThreads": if (null == componentKey) { - this.Core.OnMessage(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); + this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); } - properties["QCListenerMaxThreads"] = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + properties["QCListenerMaxThreads"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); break; case "QueueListenerEnabled": if (null == componentKey) { - this.Core.OnMessage(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); + this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); } - properties["QueueListenerEnabled"] = YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; + properties["QueueListenerEnabled"] = YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; break; case "QueuingEnabled": if (null == componentKey) { - this.Core.OnMessage(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); + this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); } - properties["QueuingEnabled"] = YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; + properties["QueuingEnabled"] = YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; break; case "RecycleActivationLimit": if (null == componentKey) { - this.Core.OnMessage(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); + this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); } - properties["RecycleActivationLimit"] = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + properties["RecycleActivationLimit"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); break; case "RecycleCallLimit": if (null == componentKey) { - this.Core.OnMessage(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); + this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); } - properties["RecycleCallLimit"] = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + properties["RecycleCallLimit"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); break; case "RecycleExpirationTimeout": if (null == componentKey) { - this.Core.OnMessage(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); + this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); } - properties["RecycleExpirationTimeout"] = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + properties["RecycleExpirationTimeout"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); break; case "RecycleLifetimeLimit": if (null == componentKey) { - this.Core.OnMessage(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); + this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); } - properties["RecycleLifetimeLimit"] = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + properties["RecycleLifetimeLimit"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); break; case "RecycleMemoryLimit": if (null == componentKey) { - this.Core.OnMessage(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); + this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); } - properties["RecycleMemoryLimit"] = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + properties["RecycleMemoryLimit"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); break; case "Replicable": if (null == componentKey) { - this.Core.OnMessage(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); + this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); } - properties["Replicable"] = YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; + properties["Replicable"] = YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; break; case "RunForever": if (null == componentKey) { - this.Core.OnMessage(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); + this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); } - properties["RunForever"] = YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; + properties["RunForever"] = YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; break; case "ShutdownAfter": if (null == componentKey) { - this.Core.OnMessage(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); + this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); } - properties["ShutdownAfter"] = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + properties["ShutdownAfter"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); break; case "SoapActivated": if (null == componentKey) { - this.Core.OnMessage(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); + this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); } - properties["SoapActivated"] = YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; + properties["SoapActivated"] = YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; break; case "SoapBaseUrl": if (null == componentKey) { - this.Core.OnMessage(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); + this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); } - properties["SoapBaseUrl"] = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + properties["SoapBaseUrl"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); break; case "SoapMailTo": if (null == componentKey) { - this.Core.OnMessage(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); + this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); } - properties["SoapMailTo"] = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + properties["SoapMailTo"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); break; case "SoapVRoot": if (null == componentKey) { - this.Core.OnMessage(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); + this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); } - properties["SoapVRoot"] = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + properties["SoapVRoot"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); break; case "SRPEnabled": if (null == componentKey) { - this.Core.OnMessage(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); + this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); } - properties["SRPEnabled"] = YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; + properties["SRPEnabled"] = YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; break; case "SRPTrustLevel": if (null == componentKey) { - this.Core.OnMessage(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); + this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); } - string srpTrustLevelValue = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + string srpTrustLevelValue = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); switch (srpTrustLevelValue) { case "disallowed": @@ -955,28 +948,28 @@ namespace WixToolset.Extensions properties["SRPTrustLevel"] = "262144"; break; default: - this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, "ComPlusApplication", "SRPTrustLevel", srpTrustLevelValue, "disallowed", "fullyTrusted")); + this.Messaging.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, "ComPlusApplication", "SRPTrustLevel", srpTrustLevelValue, "disallowed", "fullyTrusted")); break; } break; default: - this.Core.UnexpectedAttribute(node, attrib); + this.ParseHelper.UnexpectedAttribute(node, attrib); break; } } else { - this.Core.ParseExtensionAttribute(node, attrib); + this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, node, attrib); } } if (null != componentKey && null == name) { - this.Core.OnMessage(ComPlusErrors.RequiredAttributeUnderComponent(sourceLineNumbers, node.Name.LocalName, "Name")); + this.Messaging.Write(ComPlusErrors.RequiredAttributeUnderComponent(sourceLineNumbers, node.Name.LocalName, "Name")); } if (null == componentKey && null == id && null == name) { - this.Core.OnMessage(ComPlusErrors.RequiredAttributeNotUnderComponent(sourceLineNumbers, node.Name.LocalName, "Id", "Name")); + this.Messaging.Write(ComPlusErrors.RequiredAttributeNotUnderComponent(sourceLineNumbers, node.Name.LocalName, "Id", "Name")); } foreach (XElement child in node.Elements()) @@ -986,56 +979,56 @@ namespace WixToolset.Extensions switch (child.Name.LocalName) { case "ComPlusApplicationRole": - this.ParseComPlusApplicationRoleElement(child, componentKey, key); + this.ParseComPlusApplicationRoleElement(intermediate, section, child, componentKey, key); break; case "ComPlusAssembly": - this.ParseComPlusAssemblyElement(child, componentKey, win64, key); + this.ParseComPlusAssemblyElement(intermediate, section, child, componentKey, win64, key); break; default: - this.Core.UnexpectedElement(node, child); + this.ParseHelper.UnexpectedElement(node, child); break; } } else { - this.Core.ParseExtensionElement(node, child); + this.ParseHelper.ParseExtensionElement(this.Context.Extensions, intermediate, section, node, child); } } - Row row = this.Core.CreateRow(sourceLineNumbers, "ComPlusApplication"); - row[0] = key; - row[1] = partitionKey; - row[2] = componentKey; - row[3] = id; - row[4] = name; + var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "ComPlusApplication"); + row.Set(0, key); + row.Set(1, partitionKey); + row.Set(2, componentKey); + row.Set(3, id); + row.Set(4, name); IDictionaryEnumerator propertiesEnumerator = properties.GetEnumerator(); while (propertiesEnumerator.MoveNext()) { - Row propertyRow = this.Core.CreateRow(sourceLineNumbers, "ComPlusApplicationProperty"); - propertyRow[0] = key; - propertyRow[1] = (string)propertiesEnumerator.Key; - propertyRow[2] = (string)propertiesEnumerator.Value; + var propertyRow = this.ParseHelper.CreateRow(section, sourceLineNumbers, "ComPlusApplicationProperty"); + propertyRow.Set(0, key); + propertyRow.Set(1, (string)propertiesEnumerator.Key); + propertyRow.Set(2, (string)propertiesEnumerator.Value); } if (componentKey != null) { if (win64) { - if (this.Core.CurrentPlatform == Platform.IA64) + if (this.Context.Platform == Platform.IA64) { - this.Core.OnMessage(WixErrors.UnsupportedPlatformForElement(sourceLineNumbers, "ia64", node.Name.LocalName)); + this.Messaging.Write(ErrorMessages.UnsupportedPlatformForElement(sourceLineNumbers, "ia64", node.Name.LocalName)); } else { - this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "ConfigureComPlusInstall_x64"); - this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "ConfigureComPlusUninstall_x64"); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "ConfigureComPlusInstall_x64"); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "ConfigureComPlusUninstall_x64"); } } else { - this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "ConfigureComPlusInstall"); - this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "ConfigureComPlusUninstall"); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "ConfigureComPlusInstall"); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "ConfigureComPlusUninstall"); } } } @@ -1046,9 +1039,9 @@ namespace WixToolset.Extensions /// Element to parse. /// Identifier of parent component. /// Optional identifier of parent application. - private void ParseComPlusApplicationRoleElement(XElement node, string componentKey, string applicationKey) + private void ParseComPlusApplicationRoleElement(Intermediate intermediate, IntermediateSection section, XElement node, string componentKey, string applicationKey) { - SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); + SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node); string key = null; string name = null; @@ -1062,40 +1055,40 @@ namespace WixToolset.Extensions switch (attrib.Name.LocalName) { case "Id": - key = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); + key = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); break; case "Application": if (null != applicationKey) { - this.Core.OnMessage(WixErrors.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, node.Parent.Name.LocalName)); + this.Messaging.Write(ErrorMessages.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, node.Parent.Name.LocalName)); } - applicationKey = this.Core.GetAttributeValue(sourceLineNumbers, attrib); - this.Core.CreateSimpleReference(sourceLineNumbers, "ComPlusApplication", applicationKey); + applicationKey = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "ComPlusApplication", applicationKey); break; case "Name": - name = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + name = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); break; case "Description": if (null == componentKey) { - this.Core.OnMessage(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); + this.Messaging.Write(ComPlusErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName)); } - properties["Description"] = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + properties["Description"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); break; default: - this.Core.UnexpectedAttribute(node, attrib); + this.ParseHelper.UnexpectedAttribute(node, attrib); break; } } else { - this.Core.ParseExtensionAttribute(node, attrib); + this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, node, attrib); } } if (null == applicationKey) { - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Application")); + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Application")); } foreach (XElement child in node.Elements()) @@ -1105,35 +1098,35 @@ namespace WixToolset.Extensions switch (child.Name.LocalName) { case "ComPlusUserInApplicationRole": - this.ParseComPlusUserInApplicationRoleElement(child, componentKey, key); + this.ParseComPlusUserInApplicationRoleElement(intermediate, section, child, componentKey, key); break; case "ComPlusGroupInApplicationRole": - this.ParseComPlusGroupInApplicationRoleElement(child, componentKey, key); + this.ParseComPlusGroupInApplicationRoleElement(intermediate, section, child, componentKey, key); break; default: - this.Core.UnexpectedElement(node, child); + this.ParseHelper.UnexpectedElement(node, child); break; } } else { - this.Core.ParseExtensionElement(node, child); + this.ParseHelper.ParseExtensionElement(this.Context.Extensions, intermediate, section, node, child); } } - Row row = this.Core.CreateRow(sourceLineNumbers, "ComPlusApplicationRole"); - row[0] = key; - row[1] = applicationKey; - row[2] = componentKey; - row[3] = name; + var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "ComPlusApplicationRole"); + row.Set(0, key); + row.Set(1, applicationKey); + row.Set(2, componentKey); + row.Set(3, name); IDictionaryEnumerator propertiesEnumerator = properties.GetEnumerator(); while (propertiesEnumerator.MoveNext()) { - Row propertyRow = this.Core.CreateRow(sourceLineNumbers, "ComPlusApplicationRoleProperty"); - propertyRow[0] = key; - propertyRow[1] = (string)propertiesEnumerator.Key; - propertyRow[2] = (string)propertiesEnumerator.Value; + var propertyRow = this.ParseHelper.CreateRow(section, sourceLineNumbers, "ComPlusApplicationRoleProperty"); + propertyRow.Set(0, key); + propertyRow.Set(1, (string)propertiesEnumerator.Key); + propertyRow.Set(2, (string)propertiesEnumerator.Value); } } @@ -1143,9 +1136,9 @@ namespace WixToolset.Extensions /// Element to parse. /// Identifier of parent component. /// Optional identifier of parent application role. - private void ParseComPlusUserInApplicationRoleElement(XElement node, string componentKey, string applicationRoleKey) + private void ParseComPlusUserInApplicationRoleElement(Intermediate intermediate, IntermediateSection section, XElement node, string componentKey, string applicationRoleKey) { - SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); + SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node); string key = null; string user = null; @@ -1157,41 +1150,41 @@ namespace WixToolset.Extensions switch (attrib.Name.LocalName) { case "Id": - key = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); + key = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); break; case "ApplicationRole": if (null != applicationRoleKey) { - this.Core.OnMessage(WixErrors.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, node.Parent.Name.LocalName)); + this.Messaging.Write(ErrorMessages.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, node.Parent.Name.LocalName)); } - applicationRoleKey = this.Core.GetAttributeValue(sourceLineNumbers, attrib); - this.Core.CreateSimpleReference(sourceLineNumbers, "ComPlusApplicationRole", applicationRoleKey); + applicationRoleKey = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "ComPlusApplicationRole", applicationRoleKey); break; case "User": - user = this.Core.GetAttributeValue(sourceLineNumbers, attrib); - this.Core.CreateSimpleReference(sourceLineNumbers, "User", user); + user = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "User", user); break; default: - this.Core.UnexpectedAttribute(node, attrib); + this.ParseHelper.UnexpectedAttribute(node, attrib); break; } } else { - this.Core.ParseExtensionAttribute(node, attrib); + this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, node, attrib); } } if (null == applicationRoleKey) { - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "ApplicationRole")); + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "ApplicationRole")); } - Row row = this.Core.CreateRow(sourceLineNumbers, "ComPlusUserInApplicationRole"); - row[0] = key; - row[1] = applicationRoleKey; - row[2] = componentKey; - row[3] = user; + var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "ComPlusUserInApplicationRole"); + row.Set(0, key); + row.Set(1, applicationRoleKey); + row.Set(2, componentKey); + row.Set(3, user); } /// @@ -1200,9 +1193,9 @@ namespace WixToolset.Extensions /// Element to parse. /// Identifier of parent component. /// Optional identifier of parent application role. - private void ParseComPlusGroupInApplicationRoleElement(XElement node, string componentKey, string applicationRoleKey) + private void ParseComPlusGroupInApplicationRoleElement(Intermediate intermediate, IntermediateSection section, XElement node, string componentKey, string applicationRoleKey) { - SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); + SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node); string key = null; string group = null; @@ -1214,41 +1207,41 @@ namespace WixToolset.Extensions switch (attrib.Name.LocalName) { case "Id": - key = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); + key = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); break; case "ApplicationRole": if (null != applicationRoleKey) { - this.Core.OnMessage(WixErrors.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, node.Parent.Name.LocalName)); + this.Messaging.Write(ErrorMessages.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, node.Parent.Name.LocalName)); } - applicationRoleKey = this.Core.GetAttributeValue(sourceLineNumbers, attrib); - this.Core.CreateSimpleReference(sourceLineNumbers, "ComPlusApplicationRole", applicationRoleKey); + applicationRoleKey = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "ComPlusApplicationRole", applicationRoleKey); break; case "Group": - group = this.Core.GetAttributeValue(sourceLineNumbers, attrib); - this.Core.CreateSimpleReference(sourceLineNumbers, "Group", group); + group = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "Group", group); break; default: - this.Core.UnexpectedAttribute(node, attrib); + this.ParseHelper.UnexpectedAttribute(node, attrib); break; } } else { - this.Core.ParseExtensionAttribute(node, attrib); + this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, node, attrib); } } if (null == applicationRoleKey) { - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "ApplicationRole")); + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "ApplicationRole")); } - Row row = this.Core.CreateRow(sourceLineNumbers, "ComPlusGroupInApplicationRole"); - row[0] = key; - row[1] = applicationRoleKey; - row[2] = componentKey; - row[3] = group; + var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "ComPlusGroupInApplicationRole"); + row.Set(0, key); + row.Set(1, applicationRoleKey); + row.Set(2, componentKey); + row.Set(3, group); } /// @@ -1257,9 +1250,9 @@ namespace WixToolset.Extensions /// Element to parse. /// Identifier of parent component. /// Optional identifier of parent application. - private void ParseComPlusAssemblyElement(XElement node, string componentKey, bool win64, string applicationKey) + private void ParseComPlusAssemblyElement(Intermediate intermediate, IntermediateSection section, XElement node, string componentKey, bool win64, string applicationKey) { - SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); + SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node); string key = null; string assemblyName = null; @@ -1277,30 +1270,30 @@ namespace WixToolset.Extensions switch (attrib.Name.LocalName) { case "Id": - key = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); + key = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); break; case "Application": if (null != applicationKey) { - this.Core.OnMessage(WixErrors.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, node.Parent.Name.LocalName)); + this.Messaging.Write(ErrorMessages.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, node.Parent.Name.LocalName)); } - applicationKey = this.Core.GetAttributeValue(sourceLineNumbers, attrib); - this.Core.CreateSimpleReference(sourceLineNumbers, "ComPlusApplication", applicationKey); + applicationKey = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "ComPlusApplication", applicationKey); break; case "AssemblyName": - assemblyName = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + assemblyName = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); break; case "DllPath": - dllPath = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + dllPath = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); break; case "TlbPath": - tlbPath = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + tlbPath = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); break; case "PSDllPath": - psDllPath = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + psDllPath = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); break; case "Type": - string typeValue = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + string typeValue = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); switch (typeValue) { case ".net": @@ -1310,12 +1303,12 @@ namespace WixToolset.Extensions attributes &= ~(int)CpiAssemblyAttributes.DotNetAssembly; break; default: - this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, "ComPlusAssembly", "Type", typeValue, ".net", "native")); + this.Messaging.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, "ComPlusAssembly", "Type", typeValue, ".net", "native")); break; } break; case "EventClass": - if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib)) + if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib)) { attributes |= (int)CpiAssemblyAttributes.EventClass; } @@ -1325,7 +1318,7 @@ namespace WixToolset.Extensions } break; case "DllPathFromGAC": - if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib)) + if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib)) { attributes |= (int)CpiAssemblyAttributes.DllPathFromGAC; } @@ -1335,7 +1328,7 @@ namespace WixToolset.Extensions } break; case "RegisterInCommit": - if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib)) + if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib)) { attributes |= (int)CpiAssemblyAttributes.RegisterInCommit; } @@ -1345,35 +1338,35 @@ namespace WixToolset.Extensions } break; default: - this.Core.UnexpectedAttribute(node, attrib); + this.ParseHelper.UnexpectedAttribute(node, attrib); break; } } else { - this.Core.ParseExtensionAttribute(node, attrib); + this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, node, attrib); } } if (null == applicationKey && 0 == (attributes & (int)CpiAssemblyAttributes.DotNetAssembly)) { - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Application", "Type", "native")); + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Application", "Type", "native")); } if (null != assemblyName && 0 == (attributes & (int)CpiAssemblyAttributes.DllPathFromGAC)) { - this.Core.OnMessage(ComPlusErrors.UnexpectedAttributeWithoutOtherValue(sourceLineNumbers, node.Name.LocalName, "AssemblyName", "DllPathFromGAC", "no")); + this.Messaging.Write(ComPlusErrors.UnexpectedAttributeWithoutOtherValue(sourceLineNumbers, node.Name.LocalName, "AssemblyName", "DllPathFromGAC", "no")); } if (null == tlbPath && 0 != (attributes & (int)CpiAssemblyAttributes.DotNetAssembly)) { - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "TlbPath", "Type", ".net")); + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "TlbPath", "Type", ".net")); } if (null != psDllPath && 0 != (attributes & (int)CpiAssemblyAttributes.DotNetAssembly)) { - this.Core.OnMessage(ComPlusErrors.UnexpectedAttributeWithOtherValue(sourceLineNumbers, node.Name.LocalName, "PSDllPath", "Type", ".net")); + this.Messaging.Write(ComPlusErrors.UnexpectedAttributeWithOtherValue(sourceLineNumbers, node.Name.LocalName, "PSDllPath", "Type", ".net")); } if (0 != (attributes & (int)CpiAssemblyAttributes.EventClass) && 0 != (attributes & (int)CpiAssemblyAttributes.DotNetAssembly)) { - this.Core.OnMessage(ComPlusErrors.UnexpectedAttributeWithOtherValue(sourceLineNumbers, node.Name.LocalName, "EventClass", "yes", "Type", ".net")); + this.Messaging.Write(ComPlusErrors.UnexpectedAttributeWithOtherValue(sourceLineNumbers, node.Name.LocalName, "EventClass", "yes", "Type", ".net")); } foreach (XElement child in node.Elements()) @@ -1383,54 +1376,54 @@ namespace WixToolset.Extensions switch (child.Name.LocalName) { case "ComPlusAssemblyDependency": - this.ParseComPlusAssemblyDependencyElement(child, key); + this.ParseComPlusAssemblyDependencyElement(intermediate, section, child, key); break; case "ComPlusComponent": - this.ParseComPlusComponentElement(child, componentKey, key); + this.ParseComPlusComponentElement(intermediate, section, child, componentKey, key); hasComponents = true; break; default: - this.Core.UnexpectedElement(node, child); + this.ParseHelper.UnexpectedElement(node, child); break; } } else { - this.Core.ParseExtensionElement(node, child); + this.ParseHelper.ParseExtensionElement(this.Context.Extensions, intermediate, section, node, child); } } if (0 == (attributes & (int)CpiAssemblyAttributes.DotNetAssembly) && !hasComponents) { - this.Core.OnMessage(ComPlusWarnings.MissingComponents(sourceLineNumbers)); + this.Messaging.Write(ComPlusWarnings.MissingComponents(sourceLineNumbers)); } - Row row = this.Core.CreateRow(sourceLineNumbers, "ComPlusAssembly"); - row[0] = key; - row[1] = applicationKey; - row[2] = componentKey; - row[3] = assemblyName; - row[4] = dllPath; - row[5] = tlbPath; - row[6] = psDllPath; - row[7] = attributes; + var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "ComPlusAssembly"); + row.Set(0, key); + row.Set(1, applicationKey); + row.Set(2, componentKey); + row.Set(3, assemblyName); + row.Set(4, dllPath); + row.Set(5, tlbPath); + row.Set(6, psDllPath); + row.Set(7, attributes); if (win64) { - if (this.Core.CurrentPlatform == Platform.IA64) + if (this.Context.Platform == Platform.IA64) { - this.Core.OnMessage(WixErrors.UnsupportedPlatformForElement(sourceLineNumbers, "ia64", node.Name.LocalName)); + this.Messaging.Write(ErrorMessages.UnsupportedPlatformForElement(sourceLineNumbers, "ia64", node.Name.LocalName)); } else { - this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "ConfigureComPlusInstall_x64"); - this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "ConfigureComPlusUninstall_x64"); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "ConfigureComPlusInstall_x64"); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "ConfigureComPlusUninstall_x64"); } } else { - this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "ConfigureComPlusInstall"); - this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "ConfigureComPlusUninstall"); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "ConfigureComPlusInstall"); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "ConfigureComPlusUninstall"); } } @@ -1439,9 +1432,9 @@ namespace WixToolset.Extensions /// /// Element to parse. /// Identifier of parent assembly. - private void ParseComPlusAssemblyDependencyElement(XElement node, string assemblyKey) + private void ParseComPlusAssemblyDependencyElement(Intermediate intermediate, IntermediateSection section, XElement node, string assemblyKey) { - SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); + SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node); string requiredAssemblyKey = null; @@ -1452,22 +1445,22 @@ namespace WixToolset.Extensions switch (attrib.Name.LocalName) { case "RequiredAssembly": - requiredAssemblyKey = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + requiredAssemblyKey = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); break; default: - this.Core.UnexpectedAttribute(node, attrib); + this.ParseHelper.UnexpectedAttribute(node, attrib); break; } } else { - this.Core.ParseExtensionAttribute(node, attrib); + this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, node, attrib); } } - Row row = this.Core.CreateRow(sourceLineNumbers, "ComPlusAssemblyDependency"); - row[0] = assemblyKey; - row[1] = requiredAssemblyKey; + var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "ComPlusAssemblyDependency"); + row.Set(0, assemblyKey); + row.Set(1, requiredAssemblyKey); } /// @@ -1476,9 +1469,9 @@ namespace WixToolset.Extensions /// Element to parse. /// Identifier of parent component. /// Identifier of parent assembly. - private void ParseComPlusComponentElement(XElement node, string componentKey, string assemblyKey) + private void ParseComPlusComponentElement(Intermediate intermediate, IntermediateSection section, XElement node, string componentKey, string assemblyKey) { - SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); + SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node); string key = null; string clsid = null; @@ -1492,94 +1485,94 @@ namespace WixToolset.Extensions switch (attrib.Name.LocalName) { case "Id": - key = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); + key = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); break; case "CLSID": - clsid = "{" + this.Core.GetAttributeValue(sourceLineNumbers, attrib) + "}"; + clsid = "{" + this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib) + "}"; break; case "AllowInprocSubscribers": - properties["AllowInprocSubscribers"] = YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; + properties["AllowInprocSubscribers"] = YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; break; case "ComponentAccessChecksEnabled": - properties["ComponentAccessChecksEnabled"] = YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; + properties["ComponentAccessChecksEnabled"] = YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; break; case "ComponentTransactionTimeout": - properties["ComponentTransactionTimeout"] = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, 3600).ToString(); + properties["ComponentTransactionTimeout"] = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, 3600).ToString(); break; case "ComponentTransactionTimeoutEnabled": - properties["ComponentTransactionTimeoutEnabled"] = YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; + properties["ComponentTransactionTimeoutEnabled"] = YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; break; case "COMTIIntrinsics": - properties["COMTIIntrinsics"] = YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; + properties["COMTIIntrinsics"] = YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; break; case "ConstructionEnabled": - properties["ConstructionEnabled"] = YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; + properties["ConstructionEnabled"] = YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; break; case "ConstructorString": - properties["ConstructorString"] = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + properties["ConstructorString"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); break; case "CreationTimeout": - properties["CreationTimeout"] = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + properties["CreationTimeout"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); break; case "Description": - properties["Description"] = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + properties["Description"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); break; case "EventTrackingEnabled": - properties["EventTrackingEnabled"] = YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; + properties["EventTrackingEnabled"] = YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; break; case "ExceptionClass": - properties["ExceptionClass"] = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + properties["ExceptionClass"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); break; case "FireInParallel": - properties["FireInParallel"] = YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; + properties["FireInParallel"] = YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; break; case "IISIntrinsics": - properties["IISIntrinsics"] = YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; + properties["IISIntrinsics"] = YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; break; case "InitializesServerApplication": - properties["InitializesServerApplication"] = YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; + properties["InitializesServerApplication"] = YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; break; case "IsEnabled": - properties["IsEnabled"] = YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; + properties["IsEnabled"] = YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; break; case "IsPrivateComponent": - properties["IsPrivateComponent"] = YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; + properties["IsPrivateComponent"] = YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; break; case "JustInTimeActivation": - properties["JustInTimeActivation"] = YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; + properties["JustInTimeActivation"] = YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; break; case "LoadBalancingSupported": - properties["LoadBalancingSupported"] = YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; + properties["LoadBalancingSupported"] = YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; break; case "MaxPoolSize": - properties["MaxPoolSize"] = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + properties["MaxPoolSize"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); break; case "MinPoolSize": - properties["MinPoolSize"] = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + properties["MinPoolSize"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); break; case "MultiInterfacePublisherFilterCLSID": - properties["MultiInterfacePublisherFilterCLSID"] = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + properties["MultiInterfacePublisherFilterCLSID"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); break; case "MustRunInClientContext": - properties["MustRunInClientContext"] = YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; + properties["MustRunInClientContext"] = YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; break; case "MustRunInDefaultContext": - properties["MustRunInDefaultContext"] = YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; + properties["MustRunInDefaultContext"] = YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; break; case "ObjectPoolingEnabled": - properties["ObjectPoolingEnabled"] = YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; + properties["ObjectPoolingEnabled"] = YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; break; case "PublisherID": - properties["PublisherID"] = TryFormatGuidValue(this.Core.GetAttributeValue(sourceLineNumbers, attrib)); + properties["PublisherID"] = this.TryFormatGuidValue(this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib)); break; case "SoapAssemblyName": - properties["SoapAssemblyName"] = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + properties["SoapAssemblyName"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); break; case "SoapTypeName": - properties["SoapTypeName"] = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + properties["SoapTypeName"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); break; case "Synchronization": - string synchronizationValue = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + string synchronizationValue = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); switch (synchronizationValue) { case "ignored": @@ -1598,12 +1591,12 @@ namespace WixToolset.Extensions properties["Synchronization"] = "4"; break; default: - this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, "ComPlusComponent", "Synchronization", synchronizationValue, "ignored", "none", "supported", "required", "requiresNew")); + this.Messaging.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, "ComPlusComponent", "Synchronization", synchronizationValue, "ignored", "none", "supported", "required", "requiresNew")); break; } break; case "Transaction": - string transactionValue = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + string transactionValue = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); switch (transactionValue) { case "ignored": @@ -1622,12 +1615,12 @@ namespace WixToolset.Extensions properties["Transaction"] = "4"; break; default: - this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, "ComPlusComponent", "Transaction", transactionValue, "ignored", "none", "supported", "required", "requiresNew")); + this.Messaging.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, "ComPlusComponent", "Transaction", transactionValue, "ignored", "none", "supported", "required", "requiresNew")); break; } break; case "TxIsolationLevel": - string txIsolationLevelValue = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + string txIsolationLevelValue = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); switch (txIsolationLevelValue) { case "any": @@ -1646,18 +1639,18 @@ namespace WixToolset.Extensions properties["TxIsolationLevel"] = "4"; break; default: - this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, "ComPlusComponent", "TxIsolationLevel", txIsolationLevelValue, "any", "readUnCommitted", "readCommitted", "repeatableRead", "serializable")); + this.Messaging.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, "ComPlusComponent", "TxIsolationLevel", txIsolationLevelValue, "any", "readUnCommitted", "readCommitted", "repeatableRead", "serializable")); break; } break; default: - this.Core.UnexpectedAttribute(node, attrib); + this.ParseHelper.UnexpectedAttribute(node, attrib); break; } } else { - this.Core.ParseExtensionAttribute(node, attrib); + this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, node, attrib); } } @@ -1668,37 +1661,37 @@ namespace WixToolset.Extensions switch (child.Name.LocalName) { case "ComPlusRoleForComponent": - this.ParseComPlusRoleForComponentElement(child, componentKey, key); + this.ParseComPlusRoleForComponentElement(intermediate, section, child, componentKey, key); break; case "ComPlusInterface": - this.ParseComPlusInterfaceElement(child, componentKey, key); + this.ParseComPlusInterfaceElement(intermediate, section, child, componentKey, key); break; case "ComPlusSubscription": - this.ParseComPlusSubscriptionElement(child, componentKey, key); + this.ParseComPlusSubscriptionElement(intermediate, section, child, componentKey, key); break; default: - this.Core.UnexpectedElement(node, child); + this.ParseHelper.UnexpectedElement(node, child); break; } } else { - this.Core.ParseExtensionElement(node, child); + this.ParseHelper.ParseExtensionElement(this.Context.Extensions, intermediate, section, node, child); } } - Row row = this.Core.CreateRow(sourceLineNumbers, "ComPlusComponent"); - row[0] = key; - row[1] = assemblyKey; - row[2] = clsid; + var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "ComPlusComponent"); + row.Set(0, key); + row.Set(1, assemblyKey); + row.Set(2, clsid); IDictionaryEnumerator propertiesEnumerator = properties.GetEnumerator(); while (propertiesEnumerator.MoveNext()) { - Row propertyRow = this.Core.CreateRow(sourceLineNumbers, "ComPlusComponentProperty"); - propertyRow[0] = key; - propertyRow[1] = (string)propertiesEnumerator.Key; - propertyRow[2] = (string)propertiesEnumerator.Value; + var propertyRow = this.ParseHelper.CreateRow(section, sourceLineNumbers, "ComPlusComponentProperty"); + propertyRow.Set(0, key); + propertyRow.Set(1, (string)propertiesEnumerator.Key); + propertyRow.Set(2, (string)propertiesEnumerator.Value); } } @@ -1708,9 +1701,9 @@ namespace WixToolset.Extensions /// Element to parse. /// Identifier of parent component. /// Identifier of parent COM+ component. - private void ParseComPlusRoleForComponentElement(XElement node, string componentKey, string cpcomponentKey) + private void ParseComPlusRoleForComponentElement(Intermediate intermediate, IntermediateSection section, XElement node, string componentKey, string cpcomponentKey) { - SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); + SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node); string key = null; string applicationRoleKey = null; @@ -1722,40 +1715,40 @@ namespace WixToolset.Extensions switch (attrib.Name.LocalName) { case "Id": - key = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); + key = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); break; case "Component": if (null != cpcomponentKey) { - this.Core.OnMessage(WixErrors.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, node.Parent.Name.LocalName)); + this.Messaging.Write(ErrorMessages.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, node.Parent.Name.LocalName)); } - cpcomponentKey = this.Core.GetAttributeValue(sourceLineNumbers, attrib); - this.Core.CreateSimpleReference(sourceLineNumbers, "ComPlusComponent", cpcomponentKey); + cpcomponentKey = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "ComPlusComponent", cpcomponentKey); break; case "ApplicationRole": - applicationRoleKey = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + applicationRoleKey = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); break; default: - this.Core.UnexpectedAttribute(node, attrib); + this.ParseHelper.UnexpectedAttribute(node, attrib); break; } } else { - this.Core.ParseExtensionAttribute(node, attrib); + this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, node, attrib); } } if (null == cpcomponentKey) { - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Component")); + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Component")); } - Row row = this.Core.CreateRow(sourceLineNumbers, "ComPlusRoleForComponent"); - row[0] = key; - row[1] = cpcomponentKey; - row[2] = applicationRoleKey; - row[3] = componentKey; + var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "ComPlusRoleForComponent"); + row.Set(0, key); + row.Set(1, cpcomponentKey); + row.Set(2, applicationRoleKey); + row.Set(3, componentKey); } /// @@ -1764,9 +1757,9 @@ namespace WixToolset.Extensions /// Element to parse. /// Identifier of parent component. /// Identifier of parent COM+ component. - private void ParseComPlusInterfaceElement(XElement node, string componentKey, string cpcomponentKey) + private void ParseComPlusInterfaceElement(Intermediate intermediate, IntermediateSection section, XElement node, string componentKey, string cpcomponentKey) { - SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); + SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node); // parse attributes string key = null; @@ -1781,25 +1774,25 @@ namespace WixToolset.Extensions switch (attrib.Name.LocalName) { case "Id": - key = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); + key = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); break; case "IID": - iid = "{" + this.Core.GetAttributeValue(sourceLineNumbers, attrib) + "}"; + iid = "{" + this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib) + "}"; break; case "Description": - properties["Description"] = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + properties["Description"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); break; case "QueuingEnabled": - properties["QueuingEnabled"] = YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; + properties["QueuingEnabled"] = YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; break; default: - this.Core.UnexpectedAttribute(node, attrib); + this.ParseHelper.UnexpectedAttribute(node, attrib); break; } } else { - this.Core.ParseExtensionAttribute(node, attrib); + this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, node, attrib); } } @@ -1810,34 +1803,34 @@ namespace WixToolset.Extensions switch (child.Name.LocalName) { case "ComPlusRoleForInterface": - this.ParseComPlusRoleForInterfaceElement(child, componentKey, key); + this.ParseComPlusRoleForInterfaceElement(intermediate, section, child, componentKey, key); break; case "ComPlusMethod": - this.ParseComPlusMethodElement(child, componentKey, key); + this.ParseComPlusMethodElement(intermediate, section, child, componentKey, key); break; default: - this.Core.UnexpectedElement(node, child); + this.ParseHelper.UnexpectedElement(node, child); break; } } else { - this.Core.ParseExtensionElement(node, child); + this.ParseHelper.ParseExtensionElement(this.Context.Extensions, intermediate, section, node, child); } } - Row row = this.Core.CreateRow(sourceLineNumbers, "ComPlusInterface"); - row[0] = key; - row[1] = cpcomponentKey; - row[2] = iid; + var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "ComPlusInterface"); + row.Set(0, key); + row.Set(1, cpcomponentKey); + row.Set(2, iid); IDictionaryEnumerator propertiesEnumerator = properties.GetEnumerator(); while (propertiesEnumerator.MoveNext()) { - Row propertyRow = this.Core.CreateRow(sourceLineNumbers, "ComPlusInterfaceProperty"); - propertyRow[0] = key; - propertyRow[1] = (string)propertiesEnumerator.Key; - propertyRow[2] = (string)propertiesEnumerator.Value; + var propertyRow = this.ParseHelper.CreateRow(section, sourceLineNumbers, "ComPlusInterfaceProperty"); + propertyRow.Set(0, key); + propertyRow.Set(1, (string)propertiesEnumerator.Key); + propertyRow.Set(2, (string)propertiesEnumerator.Value); } } @@ -1847,9 +1840,9 @@ namespace WixToolset.Extensions /// Element to parse. /// Identifier of parent component. /// Identifier of parent interface. - private void ParseComPlusRoleForInterfaceElement(XElement node, string componentKey, string interfaceKey) + private void ParseComPlusRoleForInterfaceElement(Intermediate intermediate, IntermediateSection section, XElement node, string componentKey, string interfaceKey) { - SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); + SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node); string key = null; string applicationRoleKey = null; @@ -1861,40 +1854,40 @@ namespace WixToolset.Extensions switch (attrib.Name.LocalName) { case "Id": - key = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); + key = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); break; case "Interface": if (null != interfaceKey) { - this.Core.OnMessage(WixErrors.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, node.Parent.Name.LocalName)); + this.Messaging.Write(ErrorMessages.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, node.Parent.Name.LocalName)); } - interfaceKey = this.Core.GetAttributeValue(sourceLineNumbers, attrib); - this.Core.CreateSimpleReference(sourceLineNumbers, "ComPlusInterface", interfaceKey); + interfaceKey = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "ComPlusInterface", interfaceKey); break; case "ApplicationRole": - applicationRoleKey = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + applicationRoleKey = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); break; default: - this.Core.UnexpectedAttribute(node, attrib); + this.ParseHelper.UnexpectedAttribute(node, attrib); break; } } else { - this.Core.ParseExtensionAttribute(node, attrib); + this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, node, attrib); } } if (null == interfaceKey) { - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Interface")); + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Interface")); } - Row row = this.Core.CreateRow(sourceLineNumbers, "ComPlusRoleForInterface"); - row[0] = key; - row[1] = interfaceKey; - row[2] = applicationRoleKey; - row[3] = componentKey; + var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "ComPlusRoleForInterface"); + row.Set(0, key); + row.Set(1, interfaceKey); + row.Set(2, applicationRoleKey); + row.Set(3, componentKey); } /// @@ -1903,9 +1896,9 @@ namespace WixToolset.Extensions /// Element to parse. /// Identifier of parent component. /// Identifier of parent interface. - private void ParseComPlusMethodElement(XElement node, string componentKey, string interfaceKey) + private void ParseComPlusMethodElement(Intermediate intermediate, IntermediateSection section, XElement node, string componentKey, string interfaceKey) { - SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); + SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node); string key = null; int index = CompilerConstants.IntegerNotSet; @@ -1920,28 +1913,28 @@ namespace WixToolset.Extensions switch (attrib.Name.LocalName) { case "Id": - key = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); + key = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); break; case "Index": - index = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, int.MaxValue); + index = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, int.MaxValue); break; case "Name": - name = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + name = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); break; case "AutoComplete": - properties["AutoComplete"] = YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; + properties["AutoComplete"] = YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; break; case "Description": - properties["Description"] = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + properties["Description"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); break; default: - this.Core.UnexpectedAttribute(node, attrib); + this.ParseHelper.UnexpectedAttribute(node, attrib); break; } } else { - this.Core.ParseExtensionAttribute(node, attrib); + this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, node, attrib); } } @@ -1952,40 +1945,40 @@ namespace WixToolset.Extensions switch (child.Name.LocalName) { case "ComPlusRoleForMethod": - this.ParseComPlusRoleForMethodElement(child, componentKey, key); + this.ParseComPlusRoleForMethodElement(intermediate, section, child, componentKey, key); break; default: - this.Core.UnexpectedElement(node, child); + this.ParseHelper.UnexpectedElement(node, child); break; } } else { - this.Core.ParseExtensionElement(node, child); + this.ParseHelper.ParseExtensionElement(this.Context.Extensions, intermediate, section, node, child); } } if (CompilerConstants.IntegerNotSet == index && null == name) { - this.Core.OnMessage(ComPlusErrors.RequiredAttribute(sourceLineNumbers, node.Name.LocalName, "Index", "Name")); + this.Messaging.Write(ComPlusErrors.RequiredAttribute(sourceLineNumbers, node.Name.LocalName, "Index", "Name")); } - Row row = this.Core.CreateRow(sourceLineNumbers, "ComPlusMethod"); - row[0] = key; - row[1] = interfaceKey; + var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "ComPlusMethod"); + row.Set(0, key); + row.Set(1, interfaceKey); if (CompilerConstants.IntegerNotSet != index) { - row[2] = index; + row.Set(2, index); } - row[3] = name; + row.Set(3, name); IDictionaryEnumerator propertiesEnumerator = properties.GetEnumerator(); while (propertiesEnumerator.MoveNext()) { - Row propertyRow = this.Core.CreateRow(sourceLineNumbers, "ComPlusMethodProperty"); - propertyRow[0] = key; - propertyRow[1] = (string)propertiesEnumerator.Key; - propertyRow[2] = (string)propertiesEnumerator.Value; + var propertyRow = this.ParseHelper.CreateRow(section, sourceLineNumbers, "ComPlusMethodProperty"); + propertyRow.Set(0, key); + propertyRow.Set(1, (string)propertiesEnumerator.Key); + propertyRow.Set(2, (string)propertiesEnumerator.Value); } } @@ -1995,9 +1988,9 @@ namespace WixToolset.Extensions /// Element to parse. /// Identifier of parent component. /// Identifier of parent method. - private void ParseComPlusRoleForMethodElement(XElement node, string componentKey, string methodKey) + private void ParseComPlusRoleForMethodElement(Intermediate intermediate, IntermediateSection section, XElement node, string componentKey, string methodKey) { - SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); + SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node); string key = null; string applicationRoleKey = null; @@ -2009,40 +2002,40 @@ namespace WixToolset.Extensions switch (attrib.Name.LocalName) { case "Id": - key = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); + key = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); break; case "Method": if (null != methodKey) { - this.Core.OnMessage(WixErrors.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, node.Parent.Name.LocalName)); + this.Messaging.Write(ErrorMessages.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, node.Parent.Name.LocalName)); } - methodKey = this.Core.GetAttributeValue(sourceLineNumbers, attrib); - this.Core.CreateSimpleReference(sourceLineNumbers, "ComPlusMethod", methodKey); + methodKey = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "ComPlusMethod", methodKey); break; case "ApplicationRole": - applicationRoleKey = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + applicationRoleKey = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); break; default: - this.Core.UnexpectedAttribute(node, attrib); + this.ParseHelper.UnexpectedAttribute(node, attrib); break; } } else { - this.Core.ParseExtensionAttribute(node, attrib); + this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, node, attrib); } } if (null == methodKey) { - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Method")); + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Method")); } - Row row = this.Core.CreateRow(sourceLineNumbers, "ComPlusRoleForMethod"); - row[0] = key; - row[1] = methodKey; - row[2] = applicationRoleKey; - row[3] = componentKey; + var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "ComPlusRoleForMethod"); + row.Set(0, key); + row.Set(1, methodKey); + row.Set(2, applicationRoleKey); + row.Set(3, componentKey); } /// @@ -2051,9 +2044,9 @@ namespace WixToolset.Extensions /// Element to parse. /// Identifier of parent component. /// Identifier of parent COM+ component. - private void ParseComPlusSubscriptionElement(XElement node, string componentKey, string cpcomponentKey) + private void ParseComPlusSubscriptionElement(Intermediate intermediate, IntermediateSection section, XElement node, string componentKey, string cpcomponentKey) { - SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); + SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node); string key = null; string id = null; @@ -2070,95 +2063,95 @@ namespace WixToolset.Extensions switch (attrib.Name.LocalName) { case "Id": - key = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); + key = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); break; case "Component": if (null != cpcomponentKey) { - this.Core.OnMessage(WixErrors.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, node.Parent.Name.LocalName)); + this.Messaging.Write(ErrorMessages.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, node.Parent.Name.LocalName)); } - cpcomponentKey = this.Core.GetAttributeValue(sourceLineNumbers, attrib); - this.Core.CreateSimpleReference(sourceLineNumbers, "ComPlusComponent", cpcomponentKey); + cpcomponentKey = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "ComPlusComponent", cpcomponentKey); break; case "SubscriptionId": - id = TryFormatGuidValue(this.Core.GetAttributeValue(sourceLineNumbers, attrib)); + id = this.TryFormatGuidValue(this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib)); break; case "Name": - name = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + name = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); break; case "EventCLSID": - eventCLSID = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + eventCLSID = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); break; case "PublisherID": - publisherID = TryFormatGuidValue(this.Core.GetAttributeValue(sourceLineNumbers, attrib)); + publisherID = this.TryFormatGuidValue(this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib)); break; case "Description": - properties["Description"] = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + properties["Description"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); break; case "Enabled": - properties["Enabled"] = YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; + properties["Enabled"] = YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; break; case "EventClassPartitionID": - properties["EventClassPartitionID"] = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + properties["EventClassPartitionID"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); break; case "FilterCriteria": - properties["FilterCriteria"] = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + properties["FilterCriteria"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); break; case "InterfaceID": - properties["InterfaceID"] = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + properties["InterfaceID"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); break; case "MachineName": - properties["MachineName"] = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + properties["MachineName"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); break; case "MethodName": - properties["MethodName"] = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + properties["MethodName"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); break; case "PerUser": - properties["PerUser"] = YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; + properties["PerUser"] = YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; break; case "Queued": - properties["Queued"] = YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; + properties["Queued"] = YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib) ? "1" : "0"; break; case "SubscriberMoniker": - properties["SubscriberMoniker"] = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + properties["SubscriberMoniker"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); break; case "UserName": - properties["UserName"] = this.Core.GetAttributeValue(sourceLineNumbers, attrib); + properties["UserName"] = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); break; default: - this.Core.UnexpectedAttribute(node, attrib); + this.ParseHelper.UnexpectedAttribute(node, attrib); break; } } else { - this.Core.ParseExtensionAttribute(node, attrib); + this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, node, attrib); } } if (null == cpcomponentKey) { - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Component")); + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Component")); } - this.Core.ParseForExtensionElements(node); + this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, node); - Row row = this.Core.CreateRow(sourceLineNumbers, "ComPlusSubscription"); - row[0] = key; - row[1] = cpcomponentKey; - row[2] = componentKey; - row[3] = id; - row[4] = name; - row[5] = eventCLSID; - row[6] = publisherID; + var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "ComPlusSubscription"); + row.Set(0, key); + row.Set(1, cpcomponentKey); + row.Set(2, componentKey); + row.Set(3, id); + row.Set(4, name); + row.Set(5, eventCLSID); + row.Set(6, publisherID); IDictionaryEnumerator propertiesEnumerator = properties.GetEnumerator(); while (propertiesEnumerator.MoveNext()) { - Row propertyRow = this.Core.CreateRow(sourceLineNumbers, "ComPlusSubscriptionProperty"); - propertyRow[0] = key; - propertyRow[1] = (string)propertiesEnumerator.Key; - propertyRow[2] = (string)propertiesEnumerator.Value; + var propertyRow = this.ParseHelper.CreateRow(section, sourceLineNumbers, "ComPlusSubscriptionProperty"); + propertyRow.Set(0, key); + propertyRow.Set(1, (string)propertiesEnumerator.Key); + propertyRow.Set(2, (string)propertiesEnumerator.Value); } } diff --git a/src/wixext/ComPlusDecompiler.cs b/src/wixext/ComPlusDecompiler.cs index 27f1653e..6da2df94 100644 --- a/src/wixext/ComPlusDecompiler.cs +++ b/src/wixext/ComPlusDecompiler.cs @@ -1,7 +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 WixToolset.Extensions +namespace WixToolset.ComPlus { +#if TODO_CONSIDER_DECOMPILER using System; using System.Collections; using System.Globalization; @@ -1840,4 +1841,5 @@ namespace WixToolset.Extensions } } } +#endif } diff --git a/src/wixext/ComPlusErrors.cs b/src/wixext/ComPlusErrors.cs new file mode 100644 index 00000000..91b41679 --- /dev/null +++ b/src/wixext/ComPlusErrors.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.ComPlus +{ + using System; + using System.Resources; + using WixToolset.Data; + + public static class ComPlusErrors + { + public static Message IllegalAttributeWithoutComponent(SourceLineNumber sourceLineNumbers, string elementName, string attributeName) + { + return Message(sourceLineNumbers, Ids.IllegalAttributeWithoutComponent, "The {0}/@{1} attribute cannot be specified unless the element has a component as an ancestor. A {0} that does not have a component ancestor is not installed.", elementName, attributeName); + } + + public static Message IllegalElementWithoutComponent(SourceLineNumber sourceLineNumbers, string elementName) + { + return Message(sourceLineNumbers, Ids.IllegalElementWithoutComponent, "The {0} element cannot be specified unless the element has a component as an ancestor. A {0} that does not have a component ancestor is not installed.", elementName); + } + + public static Message RequiredAttribute(SourceLineNumber sourceLineNumbers, string elementName, string attributeName1, string attributeName2) + { + return Message(sourceLineNumbers, Ids.RequiredAttribute, "A {0} element must have either a {1} attribute or a {2} attribute, or both set.", elementName, attributeName1, attributeName2); + } + + public static Message RequiredAttributeNotUnderComponent(SourceLineNumber sourceLineNumbers, string elementName, string attributeName1, string attributeName2) + { + return Message(sourceLineNumbers, Ids.RequiredAttributeNotUnderComponent, "A {0} element not nested under a component must have either a {1} attribute or a {2} attribute, or both set.", elementName, attributeName1, attributeName2); + } + + public static Message RequiredAttributeUnderComponent(SourceLineNumber sourceLineNumbers, string elementName, string attributeName) + { + return Message(sourceLineNumbers, Ids.RequiredAttributeUnderComponent, "The {0}/@{1} attribute must be provided when {0} element is nested under a component.", elementName, attributeName); + } + + public static Message UnexpectedAttributeWithOtherValue(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string otherAttributeName, string otherValue) + { + return Message(sourceLineNumbers, Ids.UnexpectedAttributeWithOtherValue, "The {0}/@{1} attribute cannot coexist with the {2} attribute's value of '{3}'.", elementName, attributeName, otherAttributeName, otherValue); + } + + public static Message UnexpectedAttributeWithOtherValue(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value, string otherAttributeName, string otherValue) + { + return Message(sourceLineNumbers, Ids.UnexpectedAttributeWithOtherValue, "The {0}/@{1} attribute's value, '{2}', cannot coexist with the {3} attribute's value of '{4}'.", elementName, attributeName, value, otherAttributeName, otherValue); + } + + public static Message UnexpectedAttributeWithoutOtherValue(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string otherAttributeName, string otherValue) + { + return Message(sourceLineNumbers, Ids.UnexpectedAttributeWithoutOtherValue, "The {0}/@{1} cannot be provided unless the {2} attribute is provided with a value of '{3}'.", elementName, attributeName, otherAttributeName, otherValue); + } + + 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 + { + IllegalAttributeWithoutComponent = 6000, + IllegalElementWithoutComponent = 6001, + UnexpectedAttributeWithOtherValue = 6002, + UnexpectedAttributeWithoutOtherValue = 6003, + RequiredAttributeUnderComponent = 6004, + RequiredAttribute = 6005, + RequiredAttributeNotUnderComponent = 6006, + } + } +} diff --git a/src/wixext/ComPlusExtensionData.cs b/src/wixext/ComPlusExtensionData.cs index cedc2474..954e89f6 100644 --- a/src/wixext/ComPlusExtensionData.cs +++ b/src/wixext/ComPlusExtensionData.cs @@ -1,64 +1,30 @@ // Copyright (c) .NET 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.Extensions +namespace WixToolset.ComPlus { - using System; - using System.Reflection; using WixToolset.Data; using WixToolset.Extensibility; /// /// The WiX Toolset COM+ Extension. /// - public sealed class ComPlusExtensionData : ExtensionData + public sealed class ComPlusExtensionData : BaseExtensionData { /// /// Gets the default culture. /// /// The default culture. - public override string DefaultCulture - { - get { return "en-us"; } - } - - /// - /// Gets the optional table definitions for this extension. - /// - /// The optional table definitions for this extension. - public override TableDefinitionCollection TableDefinitions - { - get - { - return ComPlusExtensionData.GetExtensionTableDefinitions(); - } - } - - /// - /// Gets the library associated with this extension. - /// - /// The table definitions to use while loading the library. - /// The loaded library. - public override Library GetLibrary(TableDefinitionCollection tableDefinitions) - { - return ComPlusExtensionData.GetExtensionLibrary(tableDefinitions); - } + public override string DefaultCulture => "en-US"; - /// - /// Internal mechanism to access the extension's table definitions. - /// - /// Extension's table definitions. - internal static TableDefinitionCollection GetExtensionTableDefinitions() + public override bool TryGetTupleDefinitionByName(string name, out IntermediateTupleDefinition tupleDefinition) { - return ExtensionData.LoadTableDefinitionHelper(Assembly.GetExecutingAssembly(), "WixToolset.Extensions.Data.tables.xml"); + tupleDefinition = ComPlusTupleDefinitions.ByName(name); + return tupleDefinition != null; } - /// - /// Internal mechanism to access the extension's library. - /// - /// Extension's library. - internal static Library GetExtensionLibrary(TableDefinitionCollection tableDefinitions) + public override Intermediate GetLibrary(ITupleDefinitionCreator tupleDefinitions) { - return ExtensionData.LoadLibraryHelper(Assembly.GetExecutingAssembly(), "WixToolset.Extensions.Data.complus.wixlib", tableDefinitions); + return Intermediate.Load(typeof(ComPlusExtensionData).Assembly, "WixToolset.ComPlus.complus.wixlib", tupleDefinitions); } } } diff --git a/src/wixext/ComPlusExtensionFactory.cs b/src/wixext/ComPlusExtensionFactory.cs new file mode 100644 index 00000000..d9405867 --- /dev/null +++ b/src/wixext/ComPlusExtensionFactory.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.ComPlus +{ + using System; + using System.Collections.Generic; + using WixToolset.Extensibility; + + public class ComPlusExtensionFactory : BaseExtensionFactory + { + protected override IEnumerable ExtensionTypes => new[] + { + typeof(ComPlusCompiler), + typeof(ComPlusExtensionData), + typeof(ComPlusWindowsInstallerBackendBinderExtension), + }; + } +} diff --git a/src/wixext/ComPlusWarnings.cs b/src/wixext/ComPlusWarnings.cs new file mode 100644 index 00000000..e0000918 --- /dev/null +++ b/src/wixext/ComPlusWarnings.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.ComPlus +{ + using System; + using System.Resources; + using WixToolset.Data; + + public static class ComPlusWarnings + { + public static Message MissingComponents(SourceLineNumber sourceLineNumbers) + { + return Message(sourceLineNumbers, Ids.MissingComponents, "The ComPlusAssembly element has a Type attribute with a value of 'native', but the element does not contain any ComPlusComponent elements. All components contained in a native assembly must be listed, or they will not be correctly removed during uninstall."); + } + + 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 + { + MissingComponents = 6007, + } + } +} diff --git a/src/wixext/ComPlusWindowsInstallerBackendBinderExtension.cs b/src/wixext/ComPlusWindowsInstallerBackendBinderExtension.cs new file mode 100644 index 00000000..b00add9e --- /dev/null +++ b/src/wixext/ComPlusWindowsInstallerBackendBinderExtension.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.ComPlus +{ + using System.Linq; + using System.Xml; + using WixToolset.Data.WindowsInstaller; + using WixToolset.Extensibility; + + public class ComPlusWindowsInstallerBackendBinderExtension : BaseWindowsInstallerBackendBinderExtension + { + private static readonly TableDefinition[] Tables = LoadTables(); + + protected override TableDefinition[] TableDefinitionsForTuples => Tables; + + private static TableDefinition[] LoadTables() + { + using (var resourceStream = typeof(ComPlusWindowsInstallerBackendBinderExtension).Assembly.GetManifestResourceStream("WixToolset.ComPlus.tables.xml")) + using (var reader = XmlReader.Create(resourceStream)) + { + var tables = TableDefinitionCollection.Load(reader); + return tables.ToArray(); + } + } + } +} diff --git a/src/wixext/Tuples/ComPlusApplicationPropertyTuple.cs b/src/wixext/Tuples/ComPlusApplicationPropertyTuple.cs new file mode 100644 index 00000000..2582d323 --- /dev/null +++ b/src/wixext/Tuples/ComPlusApplicationPropertyTuple.cs @@ -0,0 +1,63 @@ +// Copyright (c) .NET 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.ComPlus +{ + using WixToolset.Data; + using WixToolset.ComPlus.Tuples; + + public static partial class ComPlusTupleDefinitions + { + public static readonly IntermediateTupleDefinition ComPlusApplicationProperty = new IntermediateTupleDefinition( + ComPlusTupleDefinitionType.ComPlusApplicationProperty.ToString(), + new[] + { + new IntermediateFieldDefinition(nameof(ComPlusApplicationPropertyTupleFields.Application_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ComPlusApplicationPropertyTupleFields.Name), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ComPlusApplicationPropertyTupleFields.Value), IntermediateFieldType.String), + }, + typeof(ComPlusApplicationPropertyTuple)); + } +} + +namespace WixToolset.ComPlus.Tuples +{ + using WixToolset.Data; + + public enum ComPlusApplicationPropertyTupleFields + { + Application_, + Name, + Value, + } + + public class ComPlusApplicationPropertyTuple : IntermediateTuple + { + public ComPlusApplicationPropertyTuple() : base(ComPlusTupleDefinitions.ComPlusApplicationProperty, null, null) + { + } + + public ComPlusApplicationPropertyTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(ComPlusTupleDefinitions.ComPlusApplicationProperty, sourceLineNumber, id) + { + } + + public IntermediateField this[ComPlusApplicationPropertyTupleFields index] => this.Fields[(int)index]; + + public string Application_ + { + get => this.Fields[(int)ComPlusApplicationPropertyTupleFields.Application_].AsString(); + set => this.Set((int)ComPlusApplicationPropertyTupleFields.Application_, value); + } + + public string Name + { + get => this.Fields[(int)ComPlusApplicationPropertyTupleFields.Name].AsString(); + set => this.Set((int)ComPlusApplicationPropertyTupleFields.Name, value); + } + + public string Value + { + get => this.Fields[(int)ComPlusApplicationPropertyTupleFields.Value].AsString(); + set => this.Set((int)ComPlusApplicationPropertyTupleFields.Value, value); + } + } +} \ No newline at end of file diff --git a/src/wixext/Tuples/ComPlusApplicationRolePropertyTuple.cs b/src/wixext/Tuples/ComPlusApplicationRolePropertyTuple.cs new file mode 100644 index 00000000..98eee7f8 --- /dev/null +++ b/src/wixext/Tuples/ComPlusApplicationRolePropertyTuple.cs @@ -0,0 +1,63 @@ +// Copyright (c) .NET 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.ComPlus +{ + using WixToolset.Data; + using WixToolset.ComPlus.Tuples; + + public static partial class ComPlusTupleDefinitions + { + public static readonly IntermediateTupleDefinition ComPlusApplicationRoleProperty = new IntermediateTupleDefinition( + ComPlusTupleDefinitionType.ComPlusApplicationRoleProperty.ToString(), + new[] + { + new IntermediateFieldDefinition(nameof(ComPlusApplicationRolePropertyTupleFields.ApplicationRole_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ComPlusApplicationRolePropertyTupleFields.Name), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ComPlusApplicationRolePropertyTupleFields.Value), IntermediateFieldType.String), + }, + typeof(ComPlusApplicationRolePropertyTuple)); + } +} + +namespace WixToolset.ComPlus.Tuples +{ + using WixToolset.Data; + + public enum ComPlusApplicationRolePropertyTupleFields + { + ApplicationRole_, + Name, + Value, + } + + public class ComPlusApplicationRolePropertyTuple : IntermediateTuple + { + public ComPlusApplicationRolePropertyTuple() : base(ComPlusTupleDefinitions.ComPlusApplicationRoleProperty, null, null) + { + } + + public ComPlusApplicationRolePropertyTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(ComPlusTupleDefinitions.ComPlusApplicationRoleProperty, sourceLineNumber, id) + { + } + + public IntermediateField this[ComPlusApplicationRolePropertyTupleFields index] => this.Fields[(int)index]; + + public string ApplicationRole_ + { + get => this.Fields[(int)ComPlusApplicationRolePropertyTupleFields.ApplicationRole_].AsString(); + set => this.Set((int)ComPlusApplicationRolePropertyTupleFields.ApplicationRole_, value); + } + + public string Name + { + get => this.Fields[(int)ComPlusApplicationRolePropertyTupleFields.Name].AsString(); + set => this.Set((int)ComPlusApplicationRolePropertyTupleFields.Name, value); + } + + public string Value + { + get => this.Fields[(int)ComPlusApplicationRolePropertyTupleFields.Value].AsString(); + set => this.Set((int)ComPlusApplicationRolePropertyTupleFields.Value, value); + } + } +} \ No newline at end of file diff --git a/src/wixext/Tuples/ComPlusApplicationRoleTuple.cs b/src/wixext/Tuples/ComPlusApplicationRoleTuple.cs new file mode 100644 index 00000000..5a0cf378 --- /dev/null +++ b/src/wixext/Tuples/ComPlusApplicationRoleTuple.cs @@ -0,0 +1,71 @@ +// Copyright (c) .NET 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.ComPlus +{ + using WixToolset.Data; + using WixToolset.ComPlus.Tuples; + + public static partial class ComPlusTupleDefinitions + { + public static readonly IntermediateTupleDefinition ComPlusApplicationRole = new IntermediateTupleDefinition( + ComPlusTupleDefinitionType.ComPlusApplicationRole.ToString(), + new[] + { + new IntermediateFieldDefinition(nameof(ComPlusApplicationRoleTupleFields.ApplicationRole), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ComPlusApplicationRoleTupleFields.Application_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ComPlusApplicationRoleTupleFields.Component_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ComPlusApplicationRoleTupleFields.Name), IntermediateFieldType.String), + }, + typeof(ComPlusApplicationRoleTuple)); + } +} + +namespace WixToolset.ComPlus.Tuples +{ + using WixToolset.Data; + + public enum ComPlusApplicationRoleTupleFields + { + ApplicationRole, + Application_, + Component_, + Name, + } + + public class ComPlusApplicationRoleTuple : IntermediateTuple + { + public ComPlusApplicationRoleTuple() : base(ComPlusTupleDefinitions.ComPlusApplicationRole, null, null) + { + } + + public ComPlusApplicationRoleTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(ComPlusTupleDefinitions.ComPlusApplicationRole, sourceLineNumber, id) + { + } + + public IntermediateField this[ComPlusApplicationRoleTupleFields index] => this.Fields[(int)index]; + + public string ApplicationRole + { + get => this.Fields[(int)ComPlusApplicationRoleTupleFields.ApplicationRole].AsString(); + set => this.Set((int)ComPlusApplicationRoleTupleFields.ApplicationRole, value); + } + + public string Application_ + { + get => this.Fields[(int)ComPlusApplicationRoleTupleFields.Application_].AsString(); + set => this.Set((int)ComPlusApplicationRoleTupleFields.Application_, value); + } + + public string Component_ + { + get => this.Fields[(int)ComPlusApplicationRoleTupleFields.Component_].AsString(); + set => this.Set((int)ComPlusApplicationRoleTupleFields.Component_, value); + } + + public string Name + { + get => this.Fields[(int)ComPlusApplicationRoleTupleFields.Name].AsString(); + set => this.Set((int)ComPlusApplicationRoleTupleFields.Name, value); + } + } +} \ No newline at end of file diff --git a/src/wixext/Tuples/ComPlusApplicationTuple.cs b/src/wixext/Tuples/ComPlusApplicationTuple.cs new file mode 100644 index 00000000..7fd5fbd4 --- /dev/null +++ b/src/wixext/Tuples/ComPlusApplicationTuple.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.ComPlus +{ + using WixToolset.Data; + using WixToolset.ComPlus.Tuples; + + public static partial class ComPlusTupleDefinitions + { + public static readonly IntermediateTupleDefinition ComPlusApplication = new IntermediateTupleDefinition( + ComPlusTupleDefinitionType.ComPlusApplication.ToString(), + new[] + { + new IntermediateFieldDefinition(nameof(ComPlusApplicationTupleFields.Application), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ComPlusApplicationTupleFields.Partition_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ComPlusApplicationTupleFields.Component_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ComPlusApplicationTupleFields.CustomId), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ComPlusApplicationTupleFields.Name), IntermediateFieldType.String), + }, + typeof(ComPlusApplicationTuple)); + } +} + +namespace WixToolset.ComPlus.Tuples +{ + using WixToolset.Data; + + public enum ComPlusApplicationTupleFields + { + Application, + Partition_, + Component_, + CustomId, + Name, + } + + public class ComPlusApplicationTuple : IntermediateTuple + { + public ComPlusApplicationTuple() : base(ComPlusTupleDefinitions.ComPlusApplication, null, null) + { + } + + public ComPlusApplicationTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(ComPlusTupleDefinitions.ComPlusApplication, sourceLineNumber, id) + { + } + + public IntermediateField this[ComPlusApplicationTupleFields index] => this.Fields[(int)index]; + + public string Application + { + get => this.Fields[(int)ComPlusApplicationTupleFields.Application].AsString(); + set => this.Set((int)ComPlusApplicationTupleFields.Application, value); + } + + public string Partition_ + { + get => this.Fields[(int)ComPlusApplicationTupleFields.Partition_].AsString(); + set => this.Set((int)ComPlusApplicationTupleFields.Partition_, value); + } + + public string Component_ + { + get => this.Fields[(int)ComPlusApplicationTupleFields.Component_].AsString(); + set => this.Set((int)ComPlusApplicationTupleFields.Component_, value); + } + + public string CustomId + { + get => this.Fields[(int)ComPlusApplicationTupleFields.CustomId].AsString(); + set => this.Set((int)ComPlusApplicationTupleFields.CustomId, value); + } + + public string Name + { + get => this.Fields[(int)ComPlusApplicationTupleFields.Name].AsString(); + set => this.Set((int)ComPlusApplicationTupleFields.Name, value); + } + } +} \ No newline at end of file diff --git a/src/wixext/Tuples/ComPlusAssemblyDependencyTuple.cs b/src/wixext/Tuples/ComPlusAssemblyDependencyTuple.cs new file mode 100644 index 00000000..be0bc073 --- /dev/null +++ b/src/wixext/Tuples/ComPlusAssemblyDependencyTuple.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.ComPlus +{ + using WixToolset.Data; + using WixToolset.ComPlus.Tuples; + + public static partial class ComPlusTupleDefinitions + { + public static readonly IntermediateTupleDefinition ComPlusAssemblyDependency = new IntermediateTupleDefinition( + ComPlusTupleDefinitionType.ComPlusAssemblyDependency.ToString(), + new[] + { + new IntermediateFieldDefinition(nameof(ComPlusAssemblyDependencyTupleFields.Assembly_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ComPlusAssemblyDependencyTupleFields.RequiredAssembly_), IntermediateFieldType.String), + }, + typeof(ComPlusAssemblyDependencyTuple)); + } +} + +namespace WixToolset.ComPlus.Tuples +{ + using WixToolset.Data; + + public enum ComPlusAssemblyDependencyTupleFields + { + Assembly_, + RequiredAssembly_, + } + + public class ComPlusAssemblyDependencyTuple : IntermediateTuple + { + public ComPlusAssemblyDependencyTuple() : base(ComPlusTupleDefinitions.ComPlusAssemblyDependency, null, null) + { + } + + public ComPlusAssemblyDependencyTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(ComPlusTupleDefinitions.ComPlusAssemblyDependency, sourceLineNumber, id) + { + } + + public IntermediateField this[ComPlusAssemblyDependencyTupleFields index] => this.Fields[(int)index]; + + public string Assembly_ + { + get => this.Fields[(int)ComPlusAssemblyDependencyTupleFields.Assembly_].AsString(); + set => this.Set((int)ComPlusAssemblyDependencyTupleFields.Assembly_, value); + } + + public string RequiredAssembly_ + { + get => this.Fields[(int)ComPlusAssemblyDependencyTupleFields.RequiredAssembly_].AsString(); + set => this.Set((int)ComPlusAssemblyDependencyTupleFields.RequiredAssembly_, value); + } + } +} \ No newline at end of file diff --git a/src/wixext/Tuples/ComPlusAssemblyTuple.cs b/src/wixext/Tuples/ComPlusAssemblyTuple.cs new file mode 100644 index 00000000..0330b4e8 --- /dev/null +++ b/src/wixext/Tuples/ComPlusAssemblyTuple.cs @@ -0,0 +1,103 @@ +// Copyright (c) .NET 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.ComPlus +{ + using WixToolset.Data; + using WixToolset.ComPlus.Tuples; + + public static partial class ComPlusTupleDefinitions + { + public static readonly IntermediateTupleDefinition ComPlusAssembly = new IntermediateTupleDefinition( + ComPlusTupleDefinitionType.ComPlusAssembly.ToString(), + new[] + { + new IntermediateFieldDefinition(nameof(ComPlusAssemblyTupleFields.Assembly), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ComPlusAssemblyTupleFields.Application_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ComPlusAssemblyTupleFields.Component_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ComPlusAssemblyTupleFields.AssemblyName), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ComPlusAssemblyTupleFields.DllPath), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ComPlusAssemblyTupleFields.TlbPath), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ComPlusAssemblyTupleFields.PSDllPath), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ComPlusAssemblyTupleFields.Attributes), IntermediateFieldType.Number), + }, + typeof(ComPlusAssemblyTuple)); + } +} + +namespace WixToolset.ComPlus.Tuples +{ + using WixToolset.Data; + + public enum ComPlusAssemblyTupleFields + { + Assembly, + Application_, + Component_, + AssemblyName, + DllPath, + TlbPath, + PSDllPath, + Attributes, + } + + public class ComPlusAssemblyTuple : IntermediateTuple + { + public ComPlusAssemblyTuple() : base(ComPlusTupleDefinitions.ComPlusAssembly, null, null) + { + } + + public ComPlusAssemblyTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(ComPlusTupleDefinitions.ComPlusAssembly, sourceLineNumber, id) + { + } + + public IntermediateField this[ComPlusAssemblyTupleFields index] => this.Fields[(int)index]; + + public string Assembly + { + get => this.Fields[(int)ComPlusAssemblyTupleFields.Assembly].AsString(); + set => this.Set((int)ComPlusAssemblyTupleFields.Assembly, value); + } + + public string Application_ + { + get => this.Fields[(int)ComPlusAssemblyTupleFields.Application_].AsString(); + set => this.Set((int)ComPlusAssemblyTupleFields.Application_, value); + } + + public string Component_ + { + get => this.Fields[(int)ComPlusAssemblyTupleFields.Component_].AsString(); + set => this.Set((int)ComPlusAssemblyTupleFields.Component_, value); + } + + public string AssemblyName + { + get => this.Fields[(int)ComPlusAssemblyTupleFields.AssemblyName].AsString(); + set => this.Set((int)ComPlusAssemblyTupleFields.AssemblyName, value); + } + + public string DllPath + { + get => this.Fields[(int)ComPlusAssemblyTupleFields.DllPath].AsString(); + set => this.Set((int)ComPlusAssemblyTupleFields.DllPath, value); + } + + public string TlbPath + { + get => this.Fields[(int)ComPlusAssemblyTupleFields.TlbPath].AsString(); + set => this.Set((int)ComPlusAssemblyTupleFields.TlbPath, value); + } + + public string PSDllPath + { + get => this.Fields[(int)ComPlusAssemblyTupleFields.PSDllPath].AsString(); + set => this.Set((int)ComPlusAssemblyTupleFields.PSDllPath, value); + } + + public int Attributes + { + get => this.Fields[(int)ComPlusAssemblyTupleFields.Attributes].AsNumber(); + set => this.Set((int)ComPlusAssemblyTupleFields.Attributes, value); + } + } +} \ No newline at end of file diff --git a/src/wixext/Tuples/ComPlusComponentPropertyTuple.cs b/src/wixext/Tuples/ComPlusComponentPropertyTuple.cs new file mode 100644 index 00000000..81651343 --- /dev/null +++ b/src/wixext/Tuples/ComPlusComponentPropertyTuple.cs @@ -0,0 +1,63 @@ +// Copyright (c) .NET 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.ComPlus +{ + using WixToolset.Data; + using WixToolset.ComPlus.Tuples; + + public static partial class ComPlusTupleDefinitions + { + public static readonly IntermediateTupleDefinition ComPlusComponentProperty = new IntermediateTupleDefinition( + ComPlusTupleDefinitionType.ComPlusComponentProperty.ToString(), + new[] + { + new IntermediateFieldDefinition(nameof(ComPlusComponentPropertyTupleFields.ComPlusComponent_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ComPlusComponentPropertyTupleFields.Name), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ComPlusComponentPropertyTupleFields.Value), IntermediateFieldType.String), + }, + typeof(ComPlusComponentPropertyTuple)); + } +} + +namespace WixToolset.ComPlus.Tuples +{ + using WixToolset.Data; + + public enum ComPlusComponentPropertyTupleFields + { + ComPlusComponent_, + Name, + Value, + } + + public class ComPlusComponentPropertyTuple : IntermediateTuple + { + public ComPlusComponentPropertyTuple() : base(ComPlusTupleDefinitions.ComPlusComponentProperty, null, null) + { + } + + public ComPlusComponentPropertyTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(ComPlusTupleDefinitions.ComPlusComponentProperty, sourceLineNumber, id) + { + } + + public IntermediateField this[ComPlusComponentPropertyTupleFields index] => this.Fields[(int)index]; + + public string ComPlusComponent_ + { + get => this.Fields[(int)ComPlusComponentPropertyTupleFields.ComPlusComponent_].AsString(); + set => this.Set((int)ComPlusComponentPropertyTupleFields.ComPlusComponent_, value); + } + + public string Name + { + get => this.Fields[(int)ComPlusComponentPropertyTupleFields.Name].AsString(); + set => this.Set((int)ComPlusComponentPropertyTupleFields.Name, value); + } + + public string Value + { + get => this.Fields[(int)ComPlusComponentPropertyTupleFields.Value].AsString(); + set => this.Set((int)ComPlusComponentPropertyTupleFields.Value, value); + } + } +} \ No newline at end of file diff --git a/src/wixext/Tuples/ComPlusComponentTuple.cs b/src/wixext/Tuples/ComPlusComponentTuple.cs new file mode 100644 index 00000000..923ff6e3 --- /dev/null +++ b/src/wixext/Tuples/ComPlusComponentTuple.cs @@ -0,0 +1,63 @@ +// Copyright (c) .NET 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.ComPlus +{ + using WixToolset.Data; + using WixToolset.ComPlus.Tuples; + + public static partial class ComPlusTupleDefinitions + { + public static readonly IntermediateTupleDefinition ComPlusComponent = new IntermediateTupleDefinition( + ComPlusTupleDefinitionType.ComPlusComponent.ToString(), + new[] + { + new IntermediateFieldDefinition(nameof(ComPlusComponentTupleFields.ComPlusComponent), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ComPlusComponentTupleFields.Assembly_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ComPlusComponentTupleFields.CLSID), IntermediateFieldType.String), + }, + typeof(ComPlusComponentTuple)); + } +} + +namespace WixToolset.ComPlus.Tuples +{ + using WixToolset.Data; + + public enum ComPlusComponentTupleFields + { + ComPlusComponent, + Assembly_, + CLSID, + } + + public class ComPlusComponentTuple : IntermediateTuple + { + public ComPlusComponentTuple() : base(ComPlusTupleDefinitions.ComPlusComponent, null, null) + { + } + + public ComPlusComponentTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(ComPlusTupleDefinitions.ComPlusComponent, sourceLineNumber, id) + { + } + + public IntermediateField this[ComPlusComponentTupleFields index] => this.Fields[(int)index]; + + public string ComPlusComponent + { + get => this.Fields[(int)ComPlusComponentTupleFields.ComPlusComponent].AsString(); + set => this.Set((int)ComPlusComponentTupleFields.ComPlusComponent, value); + } + + public string Assembly_ + { + get => this.Fields[(int)ComPlusComponentTupleFields.Assembly_].AsString(); + set => this.Set((int)ComPlusComponentTupleFields.Assembly_, value); + } + + public string CLSID + { + get => this.Fields[(int)ComPlusComponentTupleFields.CLSID].AsString(); + set => this.Set((int)ComPlusComponentTupleFields.CLSID, value); + } + } +} \ No newline at end of file diff --git a/src/wixext/Tuples/ComPlusGroupInApplicationRoleTuple.cs b/src/wixext/Tuples/ComPlusGroupInApplicationRoleTuple.cs new file mode 100644 index 00000000..40b47eb3 --- /dev/null +++ b/src/wixext/Tuples/ComPlusGroupInApplicationRoleTuple.cs @@ -0,0 +1,71 @@ +// Copyright (c) .NET 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.ComPlus +{ + using WixToolset.Data; + using WixToolset.ComPlus.Tuples; + + public static partial class ComPlusTupleDefinitions + { + public static readonly IntermediateTupleDefinition ComPlusGroupInApplicationRole = new IntermediateTupleDefinition( + ComPlusTupleDefinitionType.ComPlusGroupInApplicationRole.ToString(), + new[] + { + new IntermediateFieldDefinition(nameof(ComPlusGroupInApplicationRoleTupleFields.GroupInApplicationRole), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ComPlusGroupInApplicationRoleTupleFields.ApplicationRole_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ComPlusGroupInApplicationRoleTupleFields.Component_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ComPlusGroupInApplicationRoleTupleFields.Group_), IntermediateFieldType.String), + }, + typeof(ComPlusGroupInApplicationRoleTuple)); + } +} + +namespace WixToolset.ComPlus.Tuples +{ + using WixToolset.Data; + + public enum ComPlusGroupInApplicationRoleTupleFields + { + GroupInApplicationRole, + ApplicationRole_, + Component_, + Group_, + } + + public class ComPlusGroupInApplicationRoleTuple : IntermediateTuple + { + public ComPlusGroupInApplicationRoleTuple() : base(ComPlusTupleDefinitions.ComPlusGroupInApplicationRole, null, null) + { + } + + public ComPlusGroupInApplicationRoleTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(ComPlusTupleDefinitions.ComPlusGroupInApplicationRole, sourceLineNumber, id) + { + } + + public IntermediateField this[ComPlusGroupInApplicationRoleTupleFields index] => this.Fields[(int)index]; + + public string GroupInApplicationRole + { + get => this.Fields[(int)ComPlusGroupInApplicationRoleTupleFields.GroupInApplicationRole].AsString(); + set => this.Set((int)ComPlusGroupInApplicationRoleTupleFields.GroupInApplicationRole, value); + } + + public string ApplicationRole_ + { + get => this.Fields[(int)ComPlusGroupInApplicationRoleTupleFields.ApplicationRole_].AsString(); + set => this.Set((int)ComPlusGroupInApplicationRoleTupleFields.ApplicationRole_, value); + } + + public string Component_ + { + get => this.Fields[(int)ComPlusGroupInApplicationRoleTupleFields.Component_].AsString(); + set => this.Set((int)ComPlusGroupInApplicationRoleTupleFields.Component_, value); + } + + public string Group_ + { + get => this.Fields[(int)ComPlusGroupInApplicationRoleTupleFields.Group_].AsString(); + set => this.Set((int)ComPlusGroupInApplicationRoleTupleFields.Group_, value); + } + } +} \ No newline at end of file diff --git a/src/wixext/Tuples/ComPlusGroupInPartitionRoleTuple.cs b/src/wixext/Tuples/ComPlusGroupInPartitionRoleTuple.cs new file mode 100644 index 00000000..092937f0 --- /dev/null +++ b/src/wixext/Tuples/ComPlusGroupInPartitionRoleTuple.cs @@ -0,0 +1,71 @@ +// Copyright (c) .NET 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.ComPlus +{ + using WixToolset.Data; + using WixToolset.ComPlus.Tuples; + + public static partial class ComPlusTupleDefinitions + { + public static readonly IntermediateTupleDefinition ComPlusGroupInPartitionRole = new IntermediateTupleDefinition( + ComPlusTupleDefinitionType.ComPlusGroupInPartitionRole.ToString(), + new[] + { + new IntermediateFieldDefinition(nameof(ComPlusGroupInPartitionRoleTupleFields.GroupInPartitionRole), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ComPlusGroupInPartitionRoleTupleFields.PartitionRole_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ComPlusGroupInPartitionRoleTupleFields.Component_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ComPlusGroupInPartitionRoleTupleFields.Group_), IntermediateFieldType.String), + }, + typeof(ComPlusGroupInPartitionRoleTuple)); + } +} + +namespace WixToolset.ComPlus.Tuples +{ + using WixToolset.Data; + + public enum ComPlusGroupInPartitionRoleTupleFields + { + GroupInPartitionRole, + PartitionRole_, + Component_, + Group_, + } + + public class ComPlusGroupInPartitionRoleTuple : IntermediateTuple + { + public ComPlusGroupInPartitionRoleTuple() : base(ComPlusTupleDefinitions.ComPlusGroupInPartitionRole, null, null) + { + } + + public ComPlusGroupInPartitionRoleTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(ComPlusTupleDefinitions.ComPlusGroupInPartitionRole, sourceLineNumber, id) + { + } + + public IntermediateField this[ComPlusGroupInPartitionRoleTupleFields index] => this.Fields[(int)index]; + + public string GroupInPartitionRole + { + get => this.Fields[(int)ComPlusGroupInPartitionRoleTupleFields.GroupInPartitionRole].AsString(); + set => this.Set((int)ComPlusGroupInPartitionRoleTupleFields.GroupInPartitionRole, value); + } + + public string PartitionRole_ + { + get => this.Fields[(int)ComPlusGroupInPartitionRoleTupleFields.PartitionRole_].AsString(); + set => this.Set((int)ComPlusGroupInPartitionRoleTupleFields.PartitionRole_, value); + } + + public string Component_ + { + get => this.Fields[(int)ComPlusGroupInPartitionRoleTupleFields.Component_].AsString(); + set => this.Set((int)ComPlusGroupInPartitionRoleTupleFields.Component_, value); + } + + public string Group_ + { + get => this.Fields[(int)ComPlusGroupInPartitionRoleTupleFields.Group_].AsString(); + set => this.Set((int)ComPlusGroupInPartitionRoleTupleFields.Group_, value); + } + } +} \ No newline at end of file diff --git a/src/wixext/Tuples/ComPlusInterfacePropertyTuple.cs b/src/wixext/Tuples/ComPlusInterfacePropertyTuple.cs new file mode 100644 index 00000000..94f12914 --- /dev/null +++ b/src/wixext/Tuples/ComPlusInterfacePropertyTuple.cs @@ -0,0 +1,63 @@ +// Copyright (c) .NET 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.ComPlus +{ + using WixToolset.Data; + using WixToolset.ComPlus.Tuples; + + public static partial class ComPlusTupleDefinitions + { + public static readonly IntermediateTupleDefinition ComPlusInterfaceProperty = new IntermediateTupleDefinition( + ComPlusTupleDefinitionType.ComPlusInterfaceProperty.ToString(), + new[] + { + new IntermediateFieldDefinition(nameof(ComPlusInterfacePropertyTupleFields.Interface_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ComPlusInterfacePropertyTupleFields.Name), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ComPlusInterfacePropertyTupleFields.Value), IntermediateFieldType.String), + }, + typeof(ComPlusInterfacePropertyTuple)); + } +} + +namespace WixToolset.ComPlus.Tuples +{ + using WixToolset.Data; + + public enum ComPlusInterfacePropertyTupleFields + { + Interface_, + Name, + Value, + } + + public class ComPlusInterfacePropertyTuple : IntermediateTuple + { + public ComPlusInterfacePropertyTuple() : base(ComPlusTupleDefinitions.ComPlusInterfaceProperty, null, null) + { + } + + public ComPlusInterfacePropertyTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(ComPlusTupleDefinitions.ComPlusInterfaceProperty, sourceLineNumber, id) + { + } + + public IntermediateField this[ComPlusInterfacePropertyTupleFields index] => this.Fields[(int)index]; + + public string Interface_ + { + get => this.Fields[(int)ComPlusInterfacePropertyTupleFields.Interface_].AsString(); + set => this.Set((int)ComPlusInterfacePropertyTupleFields.Interface_, value); + } + + public string Name + { + get => this.Fields[(int)ComPlusInterfacePropertyTupleFields.Name].AsString(); + set => this.Set((int)ComPlusInterfacePropertyTupleFields.Name, value); + } + + public string Value + { + get => this.Fields[(int)ComPlusInterfacePropertyTupleFields.Value].AsString(); + set => this.Set((int)ComPlusInterfacePropertyTupleFields.Value, value); + } + } +} \ No newline at end of file diff --git a/src/wixext/Tuples/ComPlusInterfaceTuple.cs b/src/wixext/Tuples/ComPlusInterfaceTuple.cs new file mode 100644 index 00000000..3c4042ef --- /dev/null +++ b/src/wixext/Tuples/ComPlusInterfaceTuple.cs @@ -0,0 +1,63 @@ +// Copyright (c) .NET 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.ComPlus +{ + using WixToolset.Data; + using WixToolset.ComPlus.Tuples; + + public static partial class ComPlusTupleDefinitions + { + public static readonly IntermediateTupleDefinition ComPlusInterface = new IntermediateTupleDefinition( + ComPlusTupleDefinitionType.ComPlusInterface.ToString(), + new[] + { + new IntermediateFieldDefinition(nameof(ComPlusInterfaceTupleFields.Interface), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ComPlusInterfaceTupleFields.ComPlusComponent_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ComPlusInterfaceTupleFields.IID), IntermediateFieldType.String), + }, + typeof(ComPlusInterfaceTuple)); + } +} + +namespace WixToolset.ComPlus.Tuples +{ + using WixToolset.Data; + + public enum ComPlusInterfaceTupleFields + { + Interface, + ComPlusComponent_, + IID, + } + + public class ComPlusInterfaceTuple : IntermediateTuple + { + public ComPlusInterfaceTuple() : base(ComPlusTupleDefinitions.ComPlusInterface, null, null) + { + } + + public ComPlusInterfaceTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(ComPlusTupleDefinitions.ComPlusInterface, sourceLineNumber, id) + { + } + + public IntermediateField this[ComPlusInterfaceTupleFields index] => this.Fields[(int)index]; + + public string Interface + { + get => this.Fields[(int)ComPlusInterfaceTupleFields.Interface].AsString(); + set => this.Set((int)ComPlusInterfaceTupleFields.Interface, value); + } + + public string ComPlusComponent_ + { + get => this.Fields[(int)ComPlusInterfaceTupleFields.ComPlusComponent_].AsString(); + set => this.Set((int)ComPlusInterfaceTupleFields.ComPlusComponent_, value); + } + + public string IID + { + get => this.Fields[(int)ComPlusInterfaceTupleFields.IID].AsString(); + set => this.Set((int)ComPlusInterfaceTupleFields.IID, value); + } + } +} \ No newline at end of file diff --git a/src/wixext/Tuples/ComPlusMethodPropertyTuple.cs b/src/wixext/Tuples/ComPlusMethodPropertyTuple.cs new file mode 100644 index 00000000..8ebc3f6b --- /dev/null +++ b/src/wixext/Tuples/ComPlusMethodPropertyTuple.cs @@ -0,0 +1,63 @@ +// Copyright (c) .NET 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.ComPlus +{ + using WixToolset.Data; + using WixToolset.ComPlus.Tuples; + + public static partial class ComPlusTupleDefinitions + { + public static readonly IntermediateTupleDefinition ComPlusMethodProperty = new IntermediateTupleDefinition( + ComPlusTupleDefinitionType.ComPlusMethodProperty.ToString(), + new[] + { + new IntermediateFieldDefinition(nameof(ComPlusMethodPropertyTupleFields.Method_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ComPlusMethodPropertyTupleFields.Name), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ComPlusMethodPropertyTupleFields.Value), IntermediateFieldType.String), + }, + typeof(ComPlusMethodPropertyTuple)); + } +} + +namespace WixToolset.ComPlus.Tuples +{ + using WixToolset.Data; + + public enum ComPlusMethodPropertyTupleFields + { + Method_, + Name, + Value, + } + + public class ComPlusMethodPropertyTuple : IntermediateTuple + { + public ComPlusMethodPropertyTuple() : base(ComPlusTupleDefinitions.ComPlusMethodProperty, null, null) + { + } + + public ComPlusMethodPropertyTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(ComPlusTupleDefinitions.ComPlusMethodProperty, sourceLineNumber, id) + { + } + + public IntermediateField this[ComPlusMethodPropertyTupleFields index] => this.Fields[(int)index]; + + public string Method_ + { + get => this.Fields[(int)ComPlusMethodPropertyTupleFields.Method_].AsString(); + set => this.Set((int)ComPlusMethodPropertyTupleFields.Method_, value); + } + + public string Name + { + get => this.Fields[(int)ComPlusMethodPropertyTupleFields.Name].AsString(); + set => this.Set((int)ComPlusMethodPropertyTupleFields.Name, value); + } + + public string Value + { + get => this.Fields[(int)ComPlusMethodPropertyTupleFields.Value].AsString(); + set => this.Set((int)ComPlusMethodPropertyTupleFields.Value, value); + } + } +} \ No newline at end of file diff --git a/src/wixext/Tuples/ComPlusMethodTuple.cs b/src/wixext/Tuples/ComPlusMethodTuple.cs new file mode 100644 index 00000000..bcca034a --- /dev/null +++ b/src/wixext/Tuples/ComPlusMethodTuple.cs @@ -0,0 +1,71 @@ +// Copyright (c) .NET 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.ComPlus +{ + using WixToolset.Data; + using WixToolset.ComPlus.Tuples; + + public static partial class ComPlusTupleDefinitions + { + public static readonly IntermediateTupleDefinition ComPlusMethod = new IntermediateTupleDefinition( + ComPlusTupleDefinitionType.ComPlusMethod.ToString(), + new[] + { + new IntermediateFieldDefinition(nameof(ComPlusMethodTupleFields.Method), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ComPlusMethodTupleFields.Interface_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ComPlusMethodTupleFields.Index), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(ComPlusMethodTupleFields.Name), IntermediateFieldType.String), + }, + typeof(ComPlusMethodTuple)); + } +} + +namespace WixToolset.ComPlus.Tuples +{ + using WixToolset.Data; + + public enum ComPlusMethodTupleFields + { + Method, + Interface_, + Index, + Name, + } + + public class ComPlusMethodTuple : IntermediateTuple + { + public ComPlusMethodTuple() : base(ComPlusTupleDefinitions.ComPlusMethod, null, null) + { + } + + public ComPlusMethodTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(ComPlusTupleDefinitions.ComPlusMethod, sourceLineNumber, id) + { + } + + public IntermediateField this[ComPlusMethodTupleFields index] => this.Fields[(int)index]; + + public string Method + { + get => this.Fields[(int)ComPlusMethodTupleFields.Method].AsString(); + set => this.Set((int)ComPlusMethodTupleFields.Method, value); + } + + public string Interface_ + { + get => this.Fields[(int)ComPlusMethodTupleFields.Interface_].AsString(); + set => this.Set((int)ComPlusMethodTupleFields.Interface_, value); + } + + public int Index + { + get => this.Fields[(int)ComPlusMethodTupleFields.Index].AsNumber(); + set => this.Set((int)ComPlusMethodTupleFields.Index, value); + } + + public string Name + { + get => this.Fields[(int)ComPlusMethodTupleFields.Name].AsString(); + set => this.Set((int)ComPlusMethodTupleFields.Name, value); + } + } +} \ No newline at end of file diff --git a/src/wixext/Tuples/ComPlusPartitionPropertyTuple.cs b/src/wixext/Tuples/ComPlusPartitionPropertyTuple.cs new file mode 100644 index 00000000..3427b10a --- /dev/null +++ b/src/wixext/Tuples/ComPlusPartitionPropertyTuple.cs @@ -0,0 +1,63 @@ +// Copyright (c) .NET 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.ComPlus +{ + using WixToolset.Data; + using WixToolset.ComPlus.Tuples; + + public static partial class ComPlusTupleDefinitions + { + public static readonly IntermediateTupleDefinition ComPlusPartitionProperty = new IntermediateTupleDefinition( + ComPlusTupleDefinitionType.ComPlusPartitionProperty.ToString(), + new[] + { + new IntermediateFieldDefinition(nameof(ComPlusPartitionPropertyTupleFields.Partition_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ComPlusPartitionPropertyTupleFields.Name), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ComPlusPartitionPropertyTupleFields.Value), IntermediateFieldType.String), + }, + typeof(ComPlusPartitionPropertyTuple)); + } +} + +namespace WixToolset.ComPlus.Tuples +{ + using WixToolset.Data; + + public enum ComPlusPartitionPropertyTupleFields + { + Partition_, + Name, + Value, + } + + public class ComPlusPartitionPropertyTuple : IntermediateTuple + { + public ComPlusPartitionPropertyTuple() : base(ComPlusTupleDefinitions.ComPlusPartitionProperty, null, null) + { + } + + public ComPlusPartitionPropertyTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(ComPlusTupleDefinitions.ComPlusPartitionProperty, sourceLineNumber, id) + { + } + + public IntermediateField this[ComPlusPartitionPropertyTupleFields index] => this.Fields[(int)index]; + + public string Partition_ + { + get => this.Fields[(int)ComPlusPartitionPropertyTupleFields.Partition_].AsString(); + set => this.Set((int)ComPlusPartitionPropertyTupleFields.Partition_, value); + } + + public string Name + { + get => this.Fields[(int)ComPlusPartitionPropertyTupleFields.Name].AsString(); + set => this.Set((int)ComPlusPartitionPropertyTupleFields.Name, value); + } + + public string Value + { + get => this.Fields[(int)ComPlusPartitionPropertyTupleFields.Value].AsString(); + set => this.Set((int)ComPlusPartitionPropertyTupleFields.Value, value); + } + } +} \ No newline at end of file diff --git a/src/wixext/Tuples/ComPlusPartitionRoleTuple.cs b/src/wixext/Tuples/ComPlusPartitionRoleTuple.cs new file mode 100644 index 00000000..a2259cc6 --- /dev/null +++ b/src/wixext/Tuples/ComPlusPartitionRoleTuple.cs @@ -0,0 +1,71 @@ +// Copyright (c) .NET 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.ComPlus +{ + using WixToolset.Data; + using WixToolset.ComPlus.Tuples; + + public static partial class ComPlusTupleDefinitions + { + public static readonly IntermediateTupleDefinition ComPlusPartitionRole = new IntermediateTupleDefinition( + ComPlusTupleDefinitionType.ComPlusPartitionRole.ToString(), + new[] + { + new IntermediateFieldDefinition(nameof(ComPlusPartitionRoleTupleFields.PartitionRole), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ComPlusPartitionRoleTupleFields.Partition_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ComPlusPartitionRoleTupleFields.Component_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ComPlusPartitionRoleTupleFields.Name), IntermediateFieldType.String), + }, + typeof(ComPlusPartitionRoleTuple)); + } +} + +namespace WixToolset.ComPlus.Tuples +{ + using WixToolset.Data; + + public enum ComPlusPartitionRoleTupleFields + { + PartitionRole, + Partition_, + Component_, + Name, + } + + public class ComPlusPartitionRoleTuple : IntermediateTuple + { + public ComPlusPartitionRoleTuple() : base(ComPlusTupleDefinitions.ComPlusPartitionRole, null, null) + { + } + + public ComPlusPartitionRoleTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(ComPlusTupleDefinitions.ComPlusPartitionRole, sourceLineNumber, id) + { + } + + public IntermediateField this[ComPlusPartitionRoleTupleFields index] => this.Fields[(int)index]; + + public string PartitionRole + { + get => this.Fields[(int)ComPlusPartitionRoleTupleFields.PartitionRole].AsString(); + set => this.Set((int)ComPlusPartitionRoleTupleFields.PartitionRole, value); + } + + public string Partition_ + { + get => this.Fields[(int)ComPlusPartitionRoleTupleFields.Partition_].AsString(); + set => this.Set((int)ComPlusPartitionRoleTupleFields.Partition_, value); + } + + public string Component_ + { + get => this.Fields[(int)ComPlusPartitionRoleTupleFields.Component_].AsString(); + set => this.Set((int)ComPlusPartitionRoleTupleFields.Component_, value); + } + + public string Name + { + get => this.Fields[(int)ComPlusPartitionRoleTupleFields.Name].AsString(); + set => this.Set((int)ComPlusPartitionRoleTupleFields.Name, value); + } + } +} \ No newline at end of file diff --git a/src/wixext/Tuples/ComPlusPartitionTuple.cs b/src/wixext/Tuples/ComPlusPartitionTuple.cs new file mode 100644 index 00000000..68de9955 --- /dev/null +++ b/src/wixext/Tuples/ComPlusPartitionTuple.cs @@ -0,0 +1,71 @@ +// Copyright (c) .NET 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.ComPlus +{ + using WixToolset.Data; + using WixToolset.ComPlus.Tuples; + + public static partial class ComPlusTupleDefinitions + { + public static readonly IntermediateTupleDefinition ComPlusPartition = new IntermediateTupleDefinition( + ComPlusTupleDefinitionType.ComPlusPartition.ToString(), + new[] + { + new IntermediateFieldDefinition(nameof(ComPlusPartitionTupleFields.Partition), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ComPlusPartitionTupleFields.Component_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ComPlusPartitionTupleFields.CustomId), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ComPlusPartitionTupleFields.Name), IntermediateFieldType.String), + }, + typeof(ComPlusPartitionTuple)); + } +} + +namespace WixToolset.ComPlus.Tuples +{ + using WixToolset.Data; + + public enum ComPlusPartitionTupleFields + { + Partition, + Component_, + CustomId, + Name, + } + + public class ComPlusPartitionTuple : IntermediateTuple + { + public ComPlusPartitionTuple() : base(ComPlusTupleDefinitions.ComPlusPartition, null, null) + { + } + + public ComPlusPartitionTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(ComPlusTupleDefinitions.ComPlusPartition, sourceLineNumber, id) + { + } + + public IntermediateField this[ComPlusPartitionTupleFields index] => this.Fields[(int)index]; + + public string Partition + { + get => this.Fields[(int)ComPlusPartitionTupleFields.Partition].AsString(); + set => this.Set((int)ComPlusPartitionTupleFields.Partition, value); + } + + public string Component_ + { + get => this.Fields[(int)ComPlusPartitionTupleFields.Component_].AsString(); + set => this.Set((int)ComPlusPartitionTupleFields.Component_, value); + } + + public string CustomId + { + get => this.Fields[(int)ComPlusPartitionTupleFields.CustomId].AsString(); + set => this.Set((int)ComPlusPartitionTupleFields.CustomId, value); + } + + public string Name + { + get => this.Fields[(int)ComPlusPartitionTupleFields.Name].AsString(); + set => this.Set((int)ComPlusPartitionTupleFields.Name, value); + } + } +} \ No newline at end of file diff --git a/src/wixext/Tuples/ComPlusPartitionUserTuple.cs b/src/wixext/Tuples/ComPlusPartitionUserTuple.cs new file mode 100644 index 00000000..33a58d38 --- /dev/null +++ b/src/wixext/Tuples/ComPlusPartitionUserTuple.cs @@ -0,0 +1,71 @@ +// Copyright (c) .NET 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.ComPlus +{ + using WixToolset.Data; + using WixToolset.ComPlus.Tuples; + + public static partial class ComPlusTupleDefinitions + { + public static readonly IntermediateTupleDefinition ComPlusPartitionUser = new IntermediateTupleDefinition( + ComPlusTupleDefinitionType.ComPlusPartitionUser.ToString(), + new[] + { + new IntermediateFieldDefinition(nameof(ComPlusPartitionUserTupleFields.PartitionUser), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ComPlusPartitionUserTupleFields.Partition_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ComPlusPartitionUserTupleFields.Component_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ComPlusPartitionUserTupleFields.User_), IntermediateFieldType.String), + }, + typeof(ComPlusPartitionUserTuple)); + } +} + +namespace WixToolset.ComPlus.Tuples +{ + using WixToolset.Data; + + public enum ComPlusPartitionUserTupleFields + { + PartitionUser, + Partition_, + Component_, + User_, + } + + public class ComPlusPartitionUserTuple : IntermediateTuple + { + public ComPlusPartitionUserTuple() : base(ComPlusTupleDefinitions.ComPlusPartitionUser, null, null) + { + } + + public ComPlusPartitionUserTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(ComPlusTupleDefinitions.ComPlusPartitionUser, sourceLineNumber, id) + { + } + + public IntermediateField this[ComPlusPartitionUserTupleFields index] => this.Fields[(int)index]; + + public string PartitionUser + { + get => this.Fields[(int)ComPlusPartitionUserTupleFields.PartitionUser].AsString(); + set => this.Set((int)ComPlusPartitionUserTupleFields.PartitionUser, value); + } + + public string Partition_ + { + get => this.Fields[(int)ComPlusPartitionUserTupleFields.Partition_].AsString(); + set => this.Set((int)ComPlusPartitionUserTupleFields.Partition_, value); + } + + public string Component_ + { + get => this.Fields[(int)ComPlusPartitionUserTupleFields.Component_].AsString(); + set => this.Set((int)ComPlusPartitionUserTupleFields.Component_, value); + } + + public string User_ + { + get => this.Fields[(int)ComPlusPartitionUserTupleFields.User_].AsString(); + set => this.Set((int)ComPlusPartitionUserTupleFields.User_, value); + } + } +} \ No newline at end of file diff --git a/src/wixext/Tuples/ComPlusRoleForComponentTuple.cs b/src/wixext/Tuples/ComPlusRoleForComponentTuple.cs new file mode 100644 index 00000000..75d8cfaf --- /dev/null +++ b/src/wixext/Tuples/ComPlusRoleForComponentTuple.cs @@ -0,0 +1,71 @@ +// Copyright (c) .NET 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.ComPlus +{ + using WixToolset.Data; + using WixToolset.ComPlus.Tuples; + + public static partial class ComPlusTupleDefinitions + { + public static readonly IntermediateTupleDefinition ComPlusRoleForComponent = new IntermediateTupleDefinition( + ComPlusTupleDefinitionType.ComPlusRoleForComponent.ToString(), + new[] + { + new IntermediateFieldDefinition(nameof(ComPlusRoleForComponentTupleFields.RoleForComponent), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ComPlusRoleForComponentTupleFields.ComPlusComponent_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ComPlusRoleForComponentTupleFields.ApplicationRole_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ComPlusRoleForComponentTupleFields.Component_), IntermediateFieldType.String), + }, + typeof(ComPlusRoleForComponentTuple)); + } +} + +namespace WixToolset.ComPlus.Tuples +{ + using WixToolset.Data; + + public enum ComPlusRoleForComponentTupleFields + { + RoleForComponent, + ComPlusComponent_, + ApplicationRole_, + Component_, + } + + public class ComPlusRoleForComponentTuple : IntermediateTuple + { + public ComPlusRoleForComponentTuple() : base(ComPlusTupleDefinitions.ComPlusRoleForComponent, null, null) + { + } + + public ComPlusRoleForComponentTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(ComPlusTupleDefinitions.ComPlusRoleForComponent, sourceLineNumber, id) + { + } + + public IntermediateField this[ComPlusRoleForComponentTupleFields index] => this.Fields[(int)index]; + + public string RoleForComponent + { + get => this.Fields[(int)ComPlusRoleForComponentTupleFields.RoleForComponent].AsString(); + set => this.Set((int)ComPlusRoleForComponentTupleFields.RoleForComponent, value); + } + + public string ComPlusComponent_ + { + get => this.Fields[(int)ComPlusRoleForComponentTupleFields.ComPlusComponent_].AsString(); + set => this.Set((int)ComPlusRoleForComponentTupleFields.ComPlusComponent_, value); + } + + public string ApplicationRole_ + { + get => this.Fields[(int)ComPlusRoleForComponentTupleFields.ApplicationRole_].AsString(); + set => this.Set((int)ComPlusRoleForComponentTupleFields.ApplicationRole_, value); + } + + public string Component_ + { + get => this.Fields[(int)ComPlusRoleForComponentTupleFields.Component_].AsString(); + set => this.Set((int)ComPlusRoleForComponentTupleFields.Component_, value); + } + } +} \ No newline at end of file diff --git a/src/wixext/Tuples/ComPlusRoleForInterfaceTuple.cs b/src/wixext/Tuples/ComPlusRoleForInterfaceTuple.cs new file mode 100644 index 00000000..139417d3 --- /dev/null +++ b/src/wixext/Tuples/ComPlusRoleForInterfaceTuple.cs @@ -0,0 +1,71 @@ +// Copyright (c) .NET 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.ComPlus +{ + using WixToolset.Data; + using WixToolset.ComPlus.Tuples; + + public static partial class ComPlusTupleDefinitions + { + public static readonly IntermediateTupleDefinition ComPlusRoleForInterface = new IntermediateTupleDefinition( + ComPlusTupleDefinitionType.ComPlusRoleForInterface.ToString(), + new[] + { + new IntermediateFieldDefinition(nameof(ComPlusRoleForInterfaceTupleFields.RoleForInterface), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ComPlusRoleForInterfaceTupleFields.Interface_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ComPlusRoleForInterfaceTupleFields.ApplicationRole_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ComPlusRoleForInterfaceTupleFields.Component_), IntermediateFieldType.String), + }, + typeof(ComPlusRoleForInterfaceTuple)); + } +} + +namespace WixToolset.ComPlus.Tuples +{ + using WixToolset.Data; + + public enum ComPlusRoleForInterfaceTupleFields + { + RoleForInterface, + Interface_, + ApplicationRole_, + Component_, + } + + public class ComPlusRoleForInterfaceTuple : IntermediateTuple + { + public ComPlusRoleForInterfaceTuple() : base(ComPlusTupleDefinitions.ComPlusRoleForInterface, null, null) + { + } + + public ComPlusRoleForInterfaceTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(ComPlusTupleDefinitions.ComPlusRoleForInterface, sourceLineNumber, id) + { + } + + public IntermediateField this[ComPlusRoleForInterfaceTupleFields index] => this.Fields[(int)index]; + + public string RoleForInterface + { + get => this.Fields[(int)ComPlusRoleForInterfaceTupleFields.RoleForInterface].AsString(); + set => this.Set((int)ComPlusRoleForInterfaceTupleFields.RoleForInterface, value); + } + + public string Interface_ + { + get => this.Fields[(int)ComPlusRoleForInterfaceTupleFields.Interface_].AsString(); + set => this.Set((int)ComPlusRoleForInterfaceTupleFields.Interface_, value); + } + + public string ApplicationRole_ + { + get => this.Fields[(int)ComPlusRoleForInterfaceTupleFields.ApplicationRole_].AsString(); + set => this.Set((int)ComPlusRoleForInterfaceTupleFields.ApplicationRole_, value); + } + + public string Component_ + { + get => this.Fields[(int)ComPlusRoleForInterfaceTupleFields.Component_].AsString(); + set => this.Set((int)ComPlusRoleForInterfaceTupleFields.Component_, value); + } + } +} \ No newline at end of file diff --git a/src/wixext/Tuples/ComPlusRoleForMethodTuple.cs b/src/wixext/Tuples/ComPlusRoleForMethodTuple.cs new file mode 100644 index 00000000..5b6e994e --- /dev/null +++ b/src/wixext/Tuples/ComPlusRoleForMethodTuple.cs @@ -0,0 +1,71 @@ +// Copyright (c) .NET 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.ComPlus +{ + using WixToolset.Data; + using WixToolset.ComPlus.Tuples; + + public static partial class ComPlusTupleDefinitions + { + public static readonly IntermediateTupleDefinition ComPlusRoleForMethod = new IntermediateTupleDefinition( + ComPlusTupleDefinitionType.ComPlusRoleForMethod.ToString(), + new[] + { + new IntermediateFieldDefinition(nameof(ComPlusRoleForMethodTupleFields.RoleForMethod), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ComPlusRoleForMethodTupleFields.Method_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ComPlusRoleForMethodTupleFields.ApplicationRole_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ComPlusRoleForMethodTupleFields.Component_), IntermediateFieldType.String), + }, + typeof(ComPlusRoleForMethodTuple)); + } +} + +namespace WixToolset.ComPlus.Tuples +{ + using WixToolset.Data; + + public enum ComPlusRoleForMethodTupleFields + { + RoleForMethod, + Method_, + ApplicationRole_, + Component_, + } + + public class ComPlusRoleForMethodTuple : IntermediateTuple + { + public ComPlusRoleForMethodTuple() : base(ComPlusTupleDefinitions.ComPlusRoleForMethod, null, null) + { + } + + public ComPlusRoleForMethodTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(ComPlusTupleDefinitions.ComPlusRoleForMethod, sourceLineNumber, id) + { + } + + public IntermediateField this[ComPlusRoleForMethodTupleFields index] => this.Fields[(int)index]; + + public string RoleForMethod + { + get => this.Fields[(int)ComPlusRoleForMethodTupleFields.RoleForMethod].AsString(); + set => this.Set((int)ComPlusRoleForMethodTupleFields.RoleForMethod, value); + } + + public string Method_ + { + get => this.Fields[(int)ComPlusRoleForMethodTupleFields.Method_].AsString(); + set => this.Set((int)ComPlusRoleForMethodTupleFields.Method_, value); + } + + public string ApplicationRole_ + { + get => this.Fields[(int)ComPlusRoleForMethodTupleFields.ApplicationRole_].AsString(); + set => this.Set((int)ComPlusRoleForMethodTupleFields.ApplicationRole_, value); + } + + public string Component_ + { + get => this.Fields[(int)ComPlusRoleForMethodTupleFields.Component_].AsString(); + set => this.Set((int)ComPlusRoleForMethodTupleFields.Component_, value); + } + } +} \ No newline at end of file diff --git a/src/wixext/Tuples/ComPlusSubscriptionPropertyTuple.cs b/src/wixext/Tuples/ComPlusSubscriptionPropertyTuple.cs new file mode 100644 index 00000000..ad0841f4 --- /dev/null +++ b/src/wixext/Tuples/ComPlusSubscriptionPropertyTuple.cs @@ -0,0 +1,63 @@ +// Copyright (c) .NET 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.ComPlus +{ + using WixToolset.Data; + using WixToolset.ComPlus.Tuples; + + public static partial class ComPlusTupleDefinitions + { + public static readonly IntermediateTupleDefinition ComPlusSubscriptionProperty = new IntermediateTupleDefinition( + ComPlusTupleDefinitionType.ComPlusSubscriptionProperty.ToString(), + new[] + { + new IntermediateFieldDefinition(nameof(ComPlusSubscriptionPropertyTupleFields.Subscription_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ComPlusSubscriptionPropertyTupleFields.Name), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ComPlusSubscriptionPropertyTupleFields.Value), IntermediateFieldType.String), + }, + typeof(ComPlusSubscriptionPropertyTuple)); + } +} + +namespace WixToolset.ComPlus.Tuples +{ + using WixToolset.Data; + + public enum ComPlusSubscriptionPropertyTupleFields + { + Subscription_, + Name, + Value, + } + + public class ComPlusSubscriptionPropertyTuple : IntermediateTuple + { + public ComPlusSubscriptionPropertyTuple() : base(ComPlusTupleDefinitions.ComPlusSubscriptionProperty, null, null) + { + } + + public ComPlusSubscriptionPropertyTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(ComPlusTupleDefinitions.ComPlusSubscriptionProperty, sourceLineNumber, id) + { + } + + public IntermediateField this[ComPlusSubscriptionPropertyTupleFields index] => this.Fields[(int)index]; + + public string Subscription_ + { + get => this.Fields[(int)ComPlusSubscriptionPropertyTupleFields.Subscription_].AsString(); + set => this.Set((int)ComPlusSubscriptionPropertyTupleFields.Subscription_, value); + } + + public string Name + { + get => this.Fields[(int)ComPlusSubscriptionPropertyTupleFields.Name].AsString(); + set => this.Set((int)ComPlusSubscriptionPropertyTupleFields.Name, value); + } + + public string Value + { + get => this.Fields[(int)ComPlusSubscriptionPropertyTupleFields.Value].AsString(); + set => this.Set((int)ComPlusSubscriptionPropertyTupleFields.Value, value); + } + } +} \ No newline at end of file diff --git a/src/wixext/Tuples/ComPlusSubscriptionTuple.cs b/src/wixext/Tuples/ComPlusSubscriptionTuple.cs new file mode 100644 index 00000000..fedab172 --- /dev/null +++ b/src/wixext/Tuples/ComPlusSubscriptionTuple.cs @@ -0,0 +1,95 @@ +// Copyright (c) .NET 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.ComPlus +{ + using WixToolset.Data; + using WixToolset.ComPlus.Tuples; + + public static partial class ComPlusTupleDefinitions + { + public static readonly IntermediateTupleDefinition ComPlusSubscription = new IntermediateTupleDefinition( + ComPlusTupleDefinitionType.ComPlusSubscription.ToString(), + new[] + { + new IntermediateFieldDefinition(nameof(ComPlusSubscriptionTupleFields.Subscription), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ComPlusSubscriptionTupleFields.ComPlusComponent_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ComPlusSubscriptionTupleFields.Component_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ComPlusSubscriptionTupleFields.CustomId), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ComPlusSubscriptionTupleFields.Name), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ComPlusSubscriptionTupleFields.EventCLSID), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ComPlusSubscriptionTupleFields.PublisherID), IntermediateFieldType.String), + }, + typeof(ComPlusSubscriptionTuple)); + } +} + +namespace WixToolset.ComPlus.Tuples +{ + using WixToolset.Data; + + public enum ComPlusSubscriptionTupleFields + { + Subscription, + ComPlusComponent_, + Component_, + CustomId, + Name, + EventCLSID, + PublisherID, + } + + public class ComPlusSubscriptionTuple : IntermediateTuple + { + public ComPlusSubscriptionTuple() : base(ComPlusTupleDefinitions.ComPlusSubscription, null, null) + { + } + + public ComPlusSubscriptionTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(ComPlusTupleDefinitions.ComPlusSubscription, sourceLineNumber, id) + { + } + + public IntermediateField this[ComPlusSubscriptionTupleFields index] => this.Fields[(int)index]; + + public string Subscription + { + get => this.Fields[(int)ComPlusSubscriptionTupleFields.Subscription].AsString(); + set => this.Set((int)ComPlusSubscriptionTupleFields.Subscription, value); + } + + public string ComPlusComponent_ + { + get => this.Fields[(int)ComPlusSubscriptionTupleFields.ComPlusComponent_].AsString(); + set => this.Set((int)ComPlusSubscriptionTupleFields.ComPlusComponent_, value); + } + + public string Component_ + { + get => this.Fields[(int)ComPlusSubscriptionTupleFields.Component_].AsString(); + set => this.Set((int)ComPlusSubscriptionTupleFields.Component_, value); + } + + public string CustomId + { + get => this.Fields[(int)ComPlusSubscriptionTupleFields.CustomId].AsString(); + set => this.Set((int)ComPlusSubscriptionTupleFields.CustomId, value); + } + + public string Name + { + get => this.Fields[(int)ComPlusSubscriptionTupleFields.Name].AsString(); + set => this.Set((int)ComPlusSubscriptionTupleFields.Name, value); + } + + public string EventCLSID + { + get => this.Fields[(int)ComPlusSubscriptionTupleFields.EventCLSID].AsString(); + set => this.Set((int)ComPlusSubscriptionTupleFields.EventCLSID, value); + } + + public string PublisherID + { + get => this.Fields[(int)ComPlusSubscriptionTupleFields.PublisherID].AsString(); + set => this.Set((int)ComPlusSubscriptionTupleFields.PublisherID, value); + } + } +} \ No newline at end of file diff --git a/src/wixext/Tuples/ComPlusTupleDefinitions.cs b/src/wixext/Tuples/ComPlusTupleDefinitions.cs new file mode 100644 index 00000000..1019c046 --- /dev/null +++ b/src/wixext/Tuples/ComPlusTupleDefinitions.cs @@ -0,0 +1,135 @@ +// Copyright (c) .NET 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.ComPlus +{ + using System; + using WixToolset.Data; + + public enum ComPlusTupleDefinitionType + { + ComPlusApplication, + ComPlusApplicationProperty, + ComPlusApplicationRole, + ComPlusApplicationRoleProperty, + ComPlusAssembly, + ComPlusAssemblyDependency, + ComPlusComponent, + ComPlusComponentProperty, + ComPlusGroupInApplicationRole, + ComPlusGroupInPartitionRole, + ComPlusInterface, + ComPlusInterfaceProperty, + ComPlusMethod, + ComPlusMethodProperty, + ComPlusPartition, + ComPlusPartitionProperty, + ComPlusPartitionRole, + ComPlusPartitionUser, + ComPlusRoleForComponent, + ComPlusRoleForInterface, + ComPlusRoleForMethod, + ComPlusSubscription, + ComPlusSubscriptionProperty, + ComPlusUserInApplicationRole, + ComPlusUserInPartitionRole, + } + + public static partial class ComPlusTupleDefinitions + { + public static readonly Version Version = new Version("4.0.0"); + + public static IntermediateTupleDefinition ByName(string name) + { + if (!Enum.TryParse(name, out ComPlusTupleDefinitionType type)) + { + return null; + } + + return ByType(type); + } + + public static IntermediateTupleDefinition ByType(ComPlusTupleDefinitionType type) + { + switch (type) + { + case ComPlusTupleDefinitionType.ComPlusApplication: + return ComPlusTupleDefinitions.ComPlusApplication; + + case ComPlusTupleDefinitionType.ComPlusApplicationProperty: + return ComPlusTupleDefinitions.ComPlusApplicationProperty; + + case ComPlusTupleDefinitionType.ComPlusApplicationRole: + return ComPlusTupleDefinitions.ComPlusApplicationRole; + + case ComPlusTupleDefinitionType.ComPlusApplicationRoleProperty: + return ComPlusTupleDefinitions.ComPlusApplicationRoleProperty; + + case ComPlusTupleDefinitionType.ComPlusAssembly: + return ComPlusTupleDefinitions.ComPlusAssembly; + + case ComPlusTupleDefinitionType.ComPlusAssemblyDependency: + return ComPlusTupleDefinitions.ComPlusAssemblyDependency; + + case ComPlusTupleDefinitionType.ComPlusComponent: + return ComPlusTupleDefinitions.ComPlusComponent; + + case ComPlusTupleDefinitionType.ComPlusComponentProperty: + return ComPlusTupleDefinitions.ComPlusComponentProperty; + + case ComPlusTupleDefinitionType.ComPlusGroupInApplicationRole: + return ComPlusTupleDefinitions.ComPlusGroupInApplicationRole; + + case ComPlusTupleDefinitionType.ComPlusGroupInPartitionRole: + return ComPlusTupleDefinitions.ComPlusGroupInPartitionRole; + + case ComPlusTupleDefinitionType.ComPlusInterface: + return ComPlusTupleDefinitions.ComPlusInterface; + + case ComPlusTupleDefinitionType.ComPlusInterfaceProperty: + return ComPlusTupleDefinitions.ComPlusInterfaceProperty; + + case ComPlusTupleDefinitionType.ComPlusMethod: + return ComPlusTupleDefinitions.ComPlusMethod; + + case ComPlusTupleDefinitionType.ComPlusMethodProperty: + return ComPlusTupleDefinitions.ComPlusMethodProperty; + + case ComPlusTupleDefinitionType.ComPlusPartition: + return ComPlusTupleDefinitions.ComPlusPartition; + + case ComPlusTupleDefinitionType.ComPlusPartitionProperty: + return ComPlusTupleDefinitions.ComPlusPartitionProperty; + + case ComPlusTupleDefinitionType.ComPlusPartitionRole: + return ComPlusTupleDefinitions.ComPlusPartitionRole; + + case ComPlusTupleDefinitionType.ComPlusPartitionUser: + return ComPlusTupleDefinitions.ComPlusPartitionUser; + + case ComPlusTupleDefinitionType.ComPlusRoleForComponent: + return ComPlusTupleDefinitions.ComPlusRoleForComponent; + + case ComPlusTupleDefinitionType.ComPlusRoleForInterface: + return ComPlusTupleDefinitions.ComPlusRoleForInterface; + + case ComPlusTupleDefinitionType.ComPlusRoleForMethod: + return ComPlusTupleDefinitions.ComPlusRoleForMethod; + + case ComPlusTupleDefinitionType.ComPlusSubscription: + return ComPlusTupleDefinitions.ComPlusSubscription; + + case ComPlusTupleDefinitionType.ComPlusSubscriptionProperty: + return ComPlusTupleDefinitions.ComPlusSubscriptionProperty; + + case ComPlusTupleDefinitionType.ComPlusUserInApplicationRole: + return ComPlusTupleDefinitions.ComPlusUserInApplicationRole; + + case ComPlusTupleDefinitionType.ComPlusUserInPartitionRole: + return ComPlusTupleDefinitions.ComPlusUserInPartitionRole; + + default: + throw new ArgumentOutOfRangeException(nameof(type)); + } + } + } +} diff --git a/src/wixext/Tuples/ComPlusUserInApplicationRoleTuple.cs b/src/wixext/Tuples/ComPlusUserInApplicationRoleTuple.cs new file mode 100644 index 00000000..3916c0ee --- /dev/null +++ b/src/wixext/Tuples/ComPlusUserInApplicationRoleTuple.cs @@ -0,0 +1,71 @@ +// Copyright (c) .NET 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.ComPlus +{ + using WixToolset.Data; + using WixToolset.ComPlus.Tuples; + + public static partial class ComPlusTupleDefinitions + { + public static readonly IntermediateTupleDefinition ComPlusUserInApplicationRole = new IntermediateTupleDefinition( + ComPlusTupleDefinitionType.ComPlusUserInApplicationRole.ToString(), + new[] + { + new IntermediateFieldDefinition(nameof(ComPlusUserInApplicationRoleTupleFields.UserInApplicationRole), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ComPlusUserInApplicationRoleTupleFields.ApplicationRole_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ComPlusUserInApplicationRoleTupleFields.Component_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ComPlusUserInApplicationRoleTupleFields.User_), IntermediateFieldType.String), + }, + typeof(ComPlusUserInApplicationRoleTuple)); + } +} + +namespace WixToolset.ComPlus.Tuples +{ + using WixToolset.Data; + + public enum ComPlusUserInApplicationRoleTupleFields + { + UserInApplicationRole, + ApplicationRole_, + Component_, + User_, + } + + public class ComPlusUserInApplicationRoleTuple : IntermediateTuple + { + public ComPlusUserInApplicationRoleTuple() : base(ComPlusTupleDefinitions.ComPlusUserInApplicationRole, null, null) + { + } + + public ComPlusUserInApplicationRoleTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(ComPlusTupleDefinitions.ComPlusUserInApplicationRole, sourceLineNumber, id) + { + } + + public IntermediateField this[ComPlusUserInApplicationRoleTupleFields index] => this.Fields[(int)index]; + + public string UserInApplicationRole + { + get => this.Fields[(int)ComPlusUserInApplicationRoleTupleFields.UserInApplicationRole].AsString(); + set => this.Set((int)ComPlusUserInApplicationRoleTupleFields.UserInApplicationRole, value); + } + + public string ApplicationRole_ + { + get => this.Fields[(int)ComPlusUserInApplicationRoleTupleFields.ApplicationRole_].AsString(); + set => this.Set((int)ComPlusUserInApplicationRoleTupleFields.ApplicationRole_, value); + } + + public string Component_ + { + get => this.Fields[(int)ComPlusUserInApplicationRoleTupleFields.Component_].AsString(); + set => this.Set((int)ComPlusUserInApplicationRoleTupleFields.Component_, value); + } + + public string User_ + { + get => this.Fields[(int)ComPlusUserInApplicationRoleTupleFields.User_].AsString(); + set => this.Set((int)ComPlusUserInApplicationRoleTupleFields.User_, value); + } + } +} \ No newline at end of file diff --git a/src/wixext/Tuples/ComPlusUserInPartitionRoleTuple.cs b/src/wixext/Tuples/ComPlusUserInPartitionRoleTuple.cs new file mode 100644 index 00000000..06d742b8 --- /dev/null +++ b/src/wixext/Tuples/ComPlusUserInPartitionRoleTuple.cs @@ -0,0 +1,71 @@ +// Copyright (c) .NET 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.ComPlus +{ + using WixToolset.Data; + using WixToolset.ComPlus.Tuples; + + public static partial class ComPlusTupleDefinitions + { + public static readonly IntermediateTupleDefinition ComPlusUserInPartitionRole = new IntermediateTupleDefinition( + ComPlusTupleDefinitionType.ComPlusUserInPartitionRole.ToString(), + new[] + { + new IntermediateFieldDefinition(nameof(ComPlusUserInPartitionRoleTupleFields.UserInPartitionRole), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ComPlusUserInPartitionRoleTupleFields.PartitionRole_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ComPlusUserInPartitionRoleTupleFields.Component_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ComPlusUserInPartitionRoleTupleFields.User_), IntermediateFieldType.String), + }, + typeof(ComPlusUserInPartitionRoleTuple)); + } +} + +namespace WixToolset.ComPlus.Tuples +{ + using WixToolset.Data; + + public enum ComPlusUserInPartitionRoleTupleFields + { + UserInPartitionRole, + PartitionRole_, + Component_, + User_, + } + + public class ComPlusUserInPartitionRoleTuple : IntermediateTuple + { + public ComPlusUserInPartitionRoleTuple() : base(ComPlusTupleDefinitions.ComPlusUserInPartitionRole, null, null) + { + } + + public ComPlusUserInPartitionRoleTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(ComPlusTupleDefinitions.ComPlusUserInPartitionRole, sourceLineNumber, id) + { + } + + public IntermediateField this[ComPlusUserInPartitionRoleTupleFields index] => this.Fields[(int)index]; + + public string UserInPartitionRole + { + get => this.Fields[(int)ComPlusUserInPartitionRoleTupleFields.UserInPartitionRole].AsString(); + set => this.Set((int)ComPlusUserInPartitionRoleTupleFields.UserInPartitionRole, value); + } + + public string PartitionRole_ + { + get => this.Fields[(int)ComPlusUserInPartitionRoleTupleFields.PartitionRole_].AsString(); + set => this.Set((int)ComPlusUserInPartitionRoleTupleFields.PartitionRole_, value); + } + + public string Component_ + { + get => this.Fields[(int)ComPlusUserInPartitionRoleTupleFields.Component_].AsString(); + set => this.Set((int)ComPlusUserInPartitionRoleTupleFields.Component_, value); + } + + public string User_ + { + get => this.Fields[(int)ComPlusUserInPartitionRoleTupleFields.User_].AsString(); + set => this.Set((int)ComPlusUserInPartitionRoleTupleFields.User_, value); + } + } +} \ No newline at end of file diff --git a/src/wixext/WixComPlusExtension.csproj b/src/wixext/WixComPlusExtension.csproj deleted file mode 100644 index 92cbacae..00000000 --- a/src/wixext/WixComPlusExtension.csproj +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - {1497B777-330B-4CFE-927A-22850CD24D64} - WixComPlusExtension - Library - WixToolset.Extensions - - - - - - - - $(RootNamespace).Data.Messages.resources - - - $(RootNamespace).Data.tables.xml - - - $(RootNamespace).Xsd.complus.xsd - - - WixToolset.Data.Serialize - WixToolset.Extensions.Serialize.ComPlus - - - complus.xsd - PreserveNewest - - - Data\complus.wixlib - - - - - - - - - - - false - - - - diff --git a/src/wixext/WixToolset.ComPlus.wixext.csproj b/src/wixext/WixToolset.ComPlus.wixext.csproj new file mode 100644 index 00000000..882dc7e1 --- /dev/null +++ b/src/wixext/WixToolset.ComPlus.wixext.csproj @@ -0,0 +1,33 @@ + + + + + + netstandard2.0 + WixToolset.ComPlus + WiX Toolset ComPlus Extension + WiX Toolset ComPlus Extension + true + build + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/wixext/WixToolset.ComPlus.wixext.targets b/src/wixext/WixToolset.ComPlus.wixext.targets new file mode 100644 index 00000000..8115b715 --- /dev/null +++ b/src/wixext/WixToolset.ComPlus.wixext.targets @@ -0,0 +1,11 @@ + + + + + + $(MSBuildThisFileDirectory)..\tools\WixToolset.ComPlus.wixext.dll + + + + + diff --git a/src/wixext/messages.xml b/src/wixext/messages.xml deleted file mode 100644 index 66c0a9e6..00000000 --- a/src/wixext/messages.xml +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - - - The {0}/@{1} attribute cannot be specified unless the element has a component as an ancestor. A {0} that does not have a component ancestor is not installed. - - - - - - - The {0} element cannot be specified unless the element has a component as an ancestor. A {0} that does not have a component ancestor is not installed. - - - - - - The {0}/@{1} attribute cannot coexist with the {2} attribute's value of '{3}'. - - - - - - - The {0}/@{1} attribute's value, '{2}', cannot coexist with the {3} attribute's value of '{4}'. - - - - - - - - - - The {0}/@{1} cannot be provided unless the {2} attribute is provided with a value of '{3}'. - - - - - - - - - The {0}/@{1} attribute must be provided when {0} element is nested under a component. - - - - - - - A {0} element must have either a {1} attribute or a {2} attribute, or both set. - - - - - - - - A {0} element not nested under a component must have either a {1} attribute or a {2} attribute, or both set. - - - - - - - - - The ComPlusAssembly element has a Type attribute with a value of 'native', but the element does not contain any ComPlusComponent elements. All components contained in a native assembly must be listed, or they will not be correctly removed during uninstall. - - - - - diff --git a/src/wixlib/ComPlusExtension.wixproj b/src/wixlib/ComPlusExtension.wixproj deleted file mode 100644 index 49c688cd..00000000 --- a/src/wixlib/ComPlusExtension.wixproj +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - {E191E61E-E098-4F71-888F-51A79F952022} - complus - Library - true - 1086 - - - - - - - - - - - - - - - diff --git a/src/wixlib/ComPlusExtension.wxs b/src/wixlib/ComPlusExtension.wxs index 3a5c1512..2a5710c0 100644 --- a/src/wixlib/ComPlusExtension.wxs +++ b/src/wixlib/ComPlusExtension.wxs @@ -60,19 +60,19 @@ - - - - - - - - - - - - - + + + + + + + + + + + + +