From 69b15d96cebdbb7201b1849b4f62786633d70b8d Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Wed, 1 Nov 2017 10:56:09 -0700 Subject: Introduce WiX Intermediate Representation --- src/WixToolset.Data/AssemblyInfo.cs | 2 +- src/WixToolset.Data/Bind/BindPath.cs | 60 + src/WixToolset.Data/Bind/BindVariable.cs | 33 + src/WixToolset.Data/BindPath.cs | 60 - src/WixToolset.Data/ColumnDefinition.cs | 1032 ------ src/WixToolset.Data/Common.cs | 17 +- src/WixToolset.Data/CompressionLevel.cs | 5 +- src/WixToolset.Data/Data/actions.xml | 76 - src/WixToolset.Data/Data/tables.xml | 1962 ----------- src/WixToolset.Data/DuplicateSymbolsException.cs | 2 + src/WixToolset.Data/Field.cs | 266 -- src/WixToolset.Data/FileFormat.cs | 2 + src/WixToolset.Data/FileStructure.cs | 65 +- src/WixToolset.Data/ITupleDefinitionCreator.cs | 9 + src/WixToolset.Data/Identifier.cs | 10 + src/WixToolset.Data/Intermediate.cs | 189 +- src/WixToolset.Data/IntermediateField.cs | 70 + src/WixToolset.Data/IntermediateFieldContext.cs | 38 + src/WixToolset.Data/IntermediateFieldDefinition.cs | 25 + src/WixToolset.Data/IntermediateFieldExtensions.cs | 206 ++ src/WixToolset.Data/IntermediateFieldPathValue.cs | 27 + src/WixToolset.Data/IntermediateFieldValue.cs | 131 + .../IntermediateFieldValueExtensions.cs | 37 + src/WixToolset.Data/IntermediateSection.cs | 118 + src/WixToolset.Data/IntermediateTuple.cs | 70 + src/WixToolset.Data/IntermediateTupleDefinition.cs | 47 + src/WixToolset.Data/IntermediateTupleExtensions.cs | 41 + src/WixToolset.Data/Json/JsonObjectExtensions.cs | 29 + src/WixToolset.Data/Json/SimpleJson.cs | 2127 ++++++++++++ src/WixToolset.Data/Library.cs | 4 +- src/WixToolset.Data/Localization.cs | 42 +- src/WixToolset.Data/Msi/MsiInterop.cs | 44 +- src/WixToolset.Data/NonClosingStreamWrapper.cs | 91 +- src/WixToolset.Data/ObjectField.cs | 183 - src/WixToolset.Data/Output.cs | 394 --- src/WixToolset.Data/Pdb.cs | 163 - src/WixToolset.Data/Row.cs | 626 ---- src/WixToolset.Data/RowDictionary.cs | 84 - src/WixToolset.Data/RowIndexedList.cs | 301 -- src/WixToolset.Data/RowOperation.cs | 30 - src/WixToolset.Data/Rows/BBControlRow.cs | 113 - src/WixToolset.Data/Rows/ComponentRow.cs | 245 -- src/WixToolset.Data/Rows/ContainerType.cs | 13 - src/WixToolset.Data/Rows/ControlRow.cs | 143 - src/WixToolset.Data/Rows/ExitCodeBehaviorType.cs | 13 - src/WixToolset.Data/Rows/FileAssemblyType.cs | 19 - src/WixToolset.Data/Rows/FileRow.cs | 640 ---- src/WixToolset.Data/Rows/MediaRow.cs | 80 - src/WixToolset.Data/Rows/PatchAttributeType.cs | 27 - src/WixToolset.Data/Rows/PropertyRow.cs | 42 - .../Rows/SummaryInfoRowCollection.cs | 42 - src/WixToolset.Data/Rows/SymbolPathType.cs | 17 - src/WixToolset.Data/Rows/UpgradeRow.cs | 90 - src/WixToolset.Data/Rows/WixActionRow.cs | 374 -- src/WixToolset.Data/Rows/WixActionRowCollection.cs | 222 -- .../Rows/WixApprovedExeForElevationRow.cs | 79 - src/WixToolset.Data/Rows/WixBundleCatalogRow.cs | 50 - src/WixToolset.Data/Rows/WixBundleContainerRow.cs | 78 - .../Rows/WixBundleExePackageAttributes.cs | 12 - src/WixToolset.Data/Rows/WixBundleExePackageRow.cs | 101 - src/WixToolset.Data/Rows/WixBundleMsiFeatureRow.cs | 93 - .../Rows/WixBundleMsiPackageAttributes.cs | 15 - src/WixToolset.Data/Rows/WixBundleMsiPackageRow.cs | 137 - .../Rows/WixBundleMsiPropertyRow.cs | 58 - .../Rows/WixBundleMspPackageAttributes.cs | 14 - src/WixToolset.Data/Rows/WixBundleMspPackageRow.cs | 99 - src/WixToolset.Data/Rows/WixBundleMsuPackageRow.cs | 57 - .../Rows/WixBundlePackageAttributes.cs | 13 - .../Rows/WixBundlePackageCommandLineRow.cs | 82 - .../Rows/WixBundlePackageExitCodeRow.cs | 51 - src/WixToolset.Data/Rows/WixBundlePackageRow.cs | 226 -- src/WixToolset.Data/Rows/WixBundlePackageType.cs | 15 - .../Rows/WixBundlePatchTargetCodeRow.cs | 81 - src/WixToolset.Data/Rows/WixBundlePayloadRow.cs | 185 - .../Rows/WixBundleRelatedPackageRow.cs | 87 - .../Rows/WixBundleRollbackBoundaryRow.cs | 59 - src/WixToolset.Data/Rows/WixBundleRow.cs | 228 -- .../Rows/WixBundleSlipstreamMspRow.cs | 48 - src/WixToolset.Data/Rows/WixBundleUpdateRow.cs | 38 - src/WixToolset.Data/Rows/WixBundleVariableRow.cs | 80 - src/WixToolset.Data/Rows/WixChainAttributes.cs | 15 - src/WixToolset.Data/Rows/WixChainItemRow.cs | 39 - src/WixToolset.Data/Rows/WixChainRow.cs | 63 - src/WixToolset.Data/Rows/WixComplexReferenceRow.cs | 208 -- src/WixToolset.Data/Rows/WixDeltaPatchFileRow.cs | 142 - .../Rows/WixDeltaPatchSymbolPathsRow.cs | 58 - src/WixToolset.Data/Rows/WixFileRow.cs | 161 - src/WixToolset.Data/Rows/WixGroupRow.cs | 62 - src/WixToolset.Data/Rows/WixMediaRow.cs | 60 - src/WixToolset.Data/Rows/WixMediaTemplateRow.cs | 81 - src/WixToolset.Data/Rows/WixMergeRow.cs | 149 - .../Rows/WixPayloadPropertiesRow.cs | 81 - src/WixToolset.Data/Rows/WixPropertyRow.cs | 118 - src/WixToolset.Data/Rows/WixRelatedBundleRow.cs | 52 - src/WixToolset.Data/Rows/WixSimpleReferenceRow.cs | 63 - .../Rows/WixUpdateRegistrationRow.cs | 62 - src/WixToolset.Data/Rows/WixVariableRow.cs | 81 - src/WixToolset.Data/Section.cs | 2 + .../SimpleTupleDefinitionCreator.cs | 13 + src/WixToolset.Data/SubStorage.cs | 109 - src/WixToolset.Data/Symbol.cs | 13 +- src/WixToolset.Data/Table.cs | 446 --- src/WixToolset.Data/TableDefinition.cs | 334 -- src/WixToolset.Data/TableDefinitionCollection.cs | 229 -- src/WixToolset.Data/TableExtensions.cs | 23 - src/WixToolset.Data/TableIndexedCollection.cs | 153 - src/WixToolset.Data/TableOperation.cs | 25 - src/WixToolset.Data/Tuples/ActionTextTuple.cs | 60 + .../Tuples/AdminExecuteSequenceTuple.cs | 60 + src/WixToolset.Data/Tuples/AdminUISequenceTuple.cs | 60 + .../Tuples/AdvtExecuteSequenceTuple.cs | 60 + src/WixToolset.Data/Tuples/AppIdTuple.cs | 92 + src/WixToolset.Data/Tuples/AppSearchTuple.cs | 52 + src/WixToolset.Data/Tuples/BBControlTuple.cs | 108 + src/WixToolset.Data/Tuples/BillboardTuple.cs | 68 + src/WixToolset.Data/Tuples/BinaryTuple.cs | 52 + src/WixToolset.Data/Tuples/BindImageTuple.cs | 52 + src/WixToolset.Data/Tuples/CCPSearchTuple.cs | 44 + src/WixToolset.Data/Tuples/CheckBoxTuple.cs | 52 + src/WixToolset.Data/Tuples/ClassTuple.cs | 140 + src/WixToolset.Data/Tuples/ComboBoxTuple.cs | 68 + src/WixToolset.Data/Tuples/CompLocatorTuple.cs | 60 + src/WixToolset.Data/Tuples/ComplusTuple.cs | 52 + src/WixToolset.Data/Tuples/ComponentTuple.cs | 84 + src/WixToolset.Data/Tuples/ConditionTuple.cs | 60 + .../Tuples/ControlConditionTuple.cs | 68 + src/WixToolset.Data/Tuples/ControlEventTuple.cs | 84 + src/WixToolset.Data/Tuples/ControlTuple.cs | 132 + src/WixToolset.Data/Tuples/CreateFolderTuple.cs | 52 + src/WixToolset.Data/Tuples/CustomActionTuple.cs | 76 + src/WixToolset.Data/Tuples/DialogTuple.cs | 116 + src/WixToolset.Data/Tuples/DirectoryTuple.cs | 60 + src/WixToolset.Data/Tuples/DrLocatorTuple.cs | 68 + src/WixToolset.Data/Tuples/DuplicateFileTuple.cs | 76 + src/WixToolset.Data/Tuples/EnvironmentTuple.cs | 68 + src/WixToolset.Data/Tuples/ErrorTuple.cs | 52 + src/WixToolset.Data/Tuples/EventMappingTuple.cs | 68 + src/WixToolset.Data/Tuples/ExtensionTuple.cs | 76 + src/WixToolset.Data/Tuples/ExternalFilesTuple.cs | 100 + .../Tuples/FamilyFileRangesTuple.cs | 68 + .../Tuples/FeatureComponentsTuple.cs | 52 + src/WixToolset.Data/Tuples/FeatureTuple.cs | 100 + src/WixToolset.Data/Tuples/FileSFPCatalogTuple.cs | 52 + src/WixToolset.Data/Tuples/FileTuple.cs | 140 + src/WixToolset.Data/Tuples/FontTuple.cs | 52 + src/WixToolset.Data/Tuples/IconTuple.cs | 52 + src/WixToolset.Data/Tuples/ImageFamiliesTuple.cs | 84 + src/WixToolset.Data/Tuples/IniFileTuple.cs | 100 + src/WixToolset.Data/Tuples/IniLocatorTuple.cs | 84 + .../Tuples/InstallExecuteSequenceTuple.cs | 60 + .../Tuples/InstallUISequenceTuple.cs | 60 + .../Tuples/IsolatedComponentTuple.cs | 52 + src/WixToolset.Data/Tuples/LaunchConditionTuple.cs | 52 + src/WixToolset.Data/Tuples/ListBoxTuple.cs | 68 + src/WixToolset.Data/Tuples/ListViewTuple.cs | 76 + src/WixToolset.Data/Tuples/LockPermissionsTuple.cs | 76 + src/WixToolset.Data/Tuples/MIMETuple.cs | 60 + src/WixToolset.Data/Tuples/MediaTuple.cs | 84 + .../Tuples/ModuleAdminExecuteSequenceTuple.cs | 76 + .../Tuples/ModuleAdminUISequenceTuple.cs | 76 + .../Tuples/ModuleAdvtExecuteSequenceTuple.cs | 76 + .../Tuples/ModuleComponentsTuple.cs | 60 + .../Tuples/ModuleConfigurationTuple.cs | 116 + .../Tuples/ModuleDependencyTuple.cs | 76 + src/WixToolset.Data/Tuples/ModuleExclusionTuple.cs | 84 + .../Tuples/ModuleIgnoreTableTuple.cs | 44 + .../Tuples/ModuleInstallExecuteSequenceTuple.cs | 76 + .../Tuples/ModuleInstallUISequenceTuple.cs | 76 + src/WixToolset.Data/Tuples/ModuleSignatureTuple.cs | 60 + .../Tuples/ModuleSubstitutionTuple.cs | 68 + src/WixToolset.Data/Tuples/MoveFileTuple.cs | 92 + src/WixToolset.Data/Tuples/MsiAssemblyNameTuple.cs | 60 + src/WixToolset.Data/Tuples/MsiAssemblyTuple.cs | 76 + .../Tuples/MsiDigitalCertificateTuple.cs | 52 + .../Tuples/MsiDigitalSignatureTuple.cs | 68 + .../Tuples/MsiEmbeddedChainerTuple.cs | 76 + src/WixToolset.Data/Tuples/MsiEmbeddedUITuple.cs | 76 + src/WixToolset.Data/Tuples/MsiFileHashTuple.cs | 84 + .../Tuples/MsiLockPermissionsExTuple.cs | 76 + .../Tuples/MsiPackageCertificateTuple.cs | 52 + .../Tuples/MsiPatchCertificateTuple.cs | 52 + src/WixToolset.Data/Tuples/MsiPatchHeadersTuple.cs | 52 + .../Tuples/MsiPatchMetadataTuple.cs | 60 + .../Tuples/MsiPatchOldAssemblyFileTuple.cs | 52 + .../Tuples/MsiPatchOldAssemblyNameTuple.cs | 60 + .../Tuples/MsiPatchSequenceTuple.cs | 68 + .../Tuples/MsiServiceConfigFailureActionsTuple.cs | 108 + .../Tuples/MsiServiceConfigTuple.cs | 84 + .../Tuples/MsiShortcutPropertyTuple.cs | 68 + src/WixToolset.Data/Tuples/ODBCAttributeTuple.cs | 60 + src/WixToolset.Data/Tuples/ODBCDataSourceTuple.cs | 76 + src/WixToolset.Data/Tuples/ODBCDriverTuple.cs | 76 + .../Tuples/ODBCSourceAttributeTuple.cs | 60 + src/WixToolset.Data/Tuples/ODBCTranslatorTuple.cs | 76 + src/WixToolset.Data/Tuples/PatchMetadataTuple.cs | 60 + src/WixToolset.Data/Tuples/PatchPackageTuple.cs | 52 + src/WixToolset.Data/Tuples/PatchSequenceTuple.cs | 68 + src/WixToolset.Data/Tuples/PatchTuple.cs | 84 + src/WixToolset.Data/Tuples/ProgIdTuple.cs | 84 + src/WixToolset.Data/Tuples/PropertiesTuple.cs | 52 + src/WixToolset.Data/Tuples/PropertyTuple.cs | 52 + .../Tuples/PublishComponentTuple.cs | 76 + src/WixToolset.Data/Tuples/RadioButtonTuple.cs | 108 + src/WixToolset.Data/Tuples/RegLocatorTuple.cs | 76 + src/WixToolset.Data/Tuples/RegistryTuple.cs | 84 + src/WixToolset.Data/Tuples/RemoveFileTuple.cs | 76 + src/WixToolset.Data/Tuples/RemoveIniFileTuple.cs | 100 + src/WixToolset.Data/Tuples/RemoveRegistryTuple.cs | 76 + src/WixToolset.Data/Tuples/ReserveCostTuple.cs | 76 + src/WixToolset.Data/Tuples/SFPCatalogTuple.cs | 60 + src/WixToolset.Data/Tuples/SelfRegTuple.cs | 52 + src/WixToolset.Data/Tuples/ServiceControlTuple.cs | 84 + src/WixToolset.Data/Tuples/ServiceInstallTuple.cs | 140 + src/WixToolset.Data/Tuples/ShortcutTuple.cs | 164 + src/WixToolset.Data/Tuples/SignatureTuple.cs | 108 + .../Tuples/TargetFiles_OptionalDataTuple.cs | 84 + src/WixToolset.Data/Tuples/TargetImagesTuple.cs | 92 + src/WixToolset.Data/Tuples/TextStyleTuple.cs | 76 + src/WixToolset.Data/Tuples/TupleDefinitions.cs | 815 +++++ src/WixToolset.Data/Tuples/TypeLibTuple.cs | 100 + src/WixToolset.Data/Tuples/UITextTuple.cs | 52 + src/WixToolset.Data/Tuples/UpgradeTuple.cs | 92 + .../Tuples/UpgradedFilesToIgnoreTuple.cs | 52 + .../Tuples/UpgradedFiles_OptionalDataTuple.cs | 76 + src/WixToolset.Data/Tuples/UpgradedImagesTuple.cs | 76 + src/WixToolset.Data/Tuples/VerbTuple.cs | 76 + src/WixToolset.Data/Tuples/WixActionTuple.cs | 103 + .../Tuples/WixApprovedExeForElevationTuple.cs | 68 + src/WixToolset.Data/Tuples/WixBBControlTuple.cs | 60 + .../Tuples/WixBindUpdatedFilesTuple.cs | 44 + .../Tuples/WixBootstrapperApplicationTuple.cs | 44 + src/WixToolset.Data/Tuples/WixBuildInfoTuple.cs | 68 + .../Tuples/WixBundleCatalogTuple.cs | 52 + .../Tuples/WixBundleContainerTuple.cs | 111 + .../Tuples/WixBundleExePackageTuple.cs | 100 + .../Tuples/WixBundleMsiFeatureTuple.cs | 116 + .../Tuples/WixBundleMsiPackageTuple.cs | 111 + .../Tuples/WixBundleMsiPropertyTuple.cs | 68 + .../Tuples/WixBundleMspPackageTuple.cs | 86 + .../Tuples/WixBundleMsuPackageTuple.cs | 60 + .../Tuples/WixBundlePackageCommandLineTuple.cs | 76 + .../Tuples/WixBundlePackageExitCodeTuple.cs | 71 + .../Tuples/WixBundlePackageGroupTuple.cs | 44 + .../Tuples/WixBundlePackageTuple.cs | 216 ++ .../Tuples/WixBundlePatchTargetCodeTuple.cs | 60 + .../Tuples/WixBundlePayloadGroupTuple.cs | 44 + .../Tuples/WixBundlePayloadTuple.cs | 214 ++ .../Tuples/WixBundlePropertiesTuple.cs | 84 + .../Tuples/WixBundleRelatedPackageTuple.cs | 108 + .../Tuples/WixBundleRollbackBoundaryTuple.cs | 60 + .../Tuples/WixBundleSlipstreamMspTuple.cs | 52 + src/WixToolset.Data/Tuples/WixBundleTuple.cs | 220 ++ src/WixToolset.Data/Tuples/WixBundleUpdateTuple.cs | 52 + .../Tuples/WixBundleVariableTuple.cs | 76 + src/WixToolset.Data/Tuples/WixChainItemTuple.cs | 44 + src/WixToolset.Data/Tuples/WixChainTuple.cs | 55 + .../Tuples/WixComplexReferenceTuple.cs | 86 + .../Tuples/WixComponentGroupTuple.cs | 44 + .../Tuples/WixComponentSearchTuple.cs | 68 + src/WixToolset.Data/Tuples/WixControlTuple.cs | 60 + src/WixToolset.Data/Tuples/WixCustomRowTuple.cs | 52 + src/WixToolset.Data/Tuples/WixCustomTableTuple.cs | 148 + .../Tuples/WixDeltaPatchFileTuple.cs | 84 + .../Tuples/WixDeltaPatchSymbolPathsTuple.cs | 75 + src/WixToolset.Data/Tuples/WixDirectoryTuple.cs | 52 + src/WixToolset.Data/Tuples/WixEnsureTableTuple.cs | 44 + src/WixToolset.Data/Tuples/WixFeatureGroupTuple.cs | 44 + .../Tuples/WixFeatureModulesTuple.cs | 52 + src/WixToolset.Data/Tuples/WixFileSearchTuple.cs | 116 + src/WixToolset.Data/Tuples/WixFileTuple.cs | 170 + src/WixToolset.Data/Tuples/WixFragmentTuple.cs | 44 + src/WixToolset.Data/Tuples/WixGroupTuple.cs | 70 + .../Tuples/WixInstanceComponentTuple.cs | 44 + .../Tuples/WixInstanceTransformsTuple.cs | 76 + .../Tuples/WixMediaTemplateTuple.cs | 86 + src/WixToolset.Data/Tuples/WixMediaTuple.cs | 62 + src/WixToolset.Data/Tuples/WixMergeTuple.cs | 100 + src/WixToolset.Data/Tuples/WixOrderingTuple.cs | 68 + .../Tuples/WixPackageFeatureInfoTuple.cs | 116 + .../Tuples/WixPackagePropertiesTuple.cs | 180 + .../Tuples/WixPatchBaselineTuple.cs | 60 + .../Tuples/WixPatchFamilyGroupTuple.cs | 44 + src/WixToolset.Data/Tuples/WixPatchIdTuple.cs | 68 + .../Tuples/WixPatchMetadataTuple.cs | 52 + src/WixToolset.Data/Tuples/WixPatchRefTuple.cs | 52 + src/WixToolset.Data/Tuples/WixPatchTargetTuple.cs | 44 + .../Tuples/WixPayloadPropertiesTuple.cs | 92 + .../Tuples/WixProductSearchTuple.cs | 60 + src/WixToolset.Data/Tuples/WixPropertyTuple.cs | 68 + .../Tuples/WixRegistrySearchTuple.cs | 76 + .../Tuples/WixRelatedBundleTuple.cs | 52 + .../Tuples/WixSearchRelationTuple.cs | 60 + src/WixToolset.Data/Tuples/WixSearchTuple.cs | 60 + .../Tuples/WixSimpleReferenceTuple.cs | 60 + .../Tuples/WixSuppressActionTuple.cs | 52 + .../Tuples/WixSuppressModularizationTuple.cs | 44 + src/WixToolset.Data/Tuples/WixUITuple.cs | 44 + .../Tuples/WixUpdateRegistrationTuple.cs | 76 + src/WixToolset.Data/Tuples/WixVariableTuple.cs | 60 + .../Tuples/_ByHandComponentTuple.cs | 55 + src/WixToolset.Data/Tuples/_ByHandFileTuple.cs | 88 + .../Tuples/_ByHandTupleDefinitions.cs | 55 + src/WixToolset.Data/Tuples/_StreamsTuple.cs | 52 + .../Tuples/_SummaryInformationTuple.cs | 52 + src/WixToolset.Data/Tuples/_TransformViewTuple.cs | 76 + src/WixToolset.Data/Tuples/_ValidationTuple.cs | 116 + src/WixToolset.Data/Tuples/tuples_new.json | 3604 ++++++++++++++++++++ src/WixToolset.Data/WindowsInstallerStandard.cs | 444 --- src/WixToolset.Data/WixDataStrings.Designer.cs | 14 +- src/WixToolset.Data/WixInvalidIdtException.cs | 32 - .../WixMissingTableDefinitionException.cs | 22 - src/WixToolset.Data/WixToolset.Data.csproj | 5 - .../WixToolsetTest.Data/TupleDefinitionFixture.cs | 135 + .../WixToolsetTest.Data/WixToolsetTest.Data.csproj | 19 + 314 files changed, 22857 insertions(+), 12737 deletions(-) create mode 100644 src/WixToolset.Data/Bind/BindPath.cs create mode 100644 src/WixToolset.Data/Bind/BindVariable.cs delete mode 100644 src/WixToolset.Data/BindPath.cs delete mode 100644 src/WixToolset.Data/ColumnDefinition.cs delete mode 100644 src/WixToolset.Data/Data/actions.xml delete mode 100644 src/WixToolset.Data/Data/tables.xml delete mode 100644 src/WixToolset.Data/Field.cs create mode 100644 src/WixToolset.Data/ITupleDefinitionCreator.cs create mode 100644 src/WixToolset.Data/IntermediateField.cs create mode 100644 src/WixToolset.Data/IntermediateFieldContext.cs create mode 100644 src/WixToolset.Data/IntermediateFieldDefinition.cs create mode 100644 src/WixToolset.Data/IntermediateFieldExtensions.cs create mode 100644 src/WixToolset.Data/IntermediateFieldPathValue.cs create mode 100644 src/WixToolset.Data/IntermediateFieldValue.cs create mode 100644 src/WixToolset.Data/IntermediateFieldValueExtensions.cs create mode 100644 src/WixToolset.Data/IntermediateSection.cs create mode 100644 src/WixToolset.Data/IntermediateTuple.cs create mode 100644 src/WixToolset.Data/IntermediateTupleDefinition.cs create mode 100644 src/WixToolset.Data/IntermediateTupleExtensions.cs create mode 100644 src/WixToolset.Data/Json/JsonObjectExtensions.cs create mode 100644 src/WixToolset.Data/Json/SimpleJson.cs delete mode 100644 src/WixToolset.Data/ObjectField.cs delete mode 100644 src/WixToolset.Data/Output.cs delete mode 100644 src/WixToolset.Data/Pdb.cs delete mode 100644 src/WixToolset.Data/Row.cs delete mode 100644 src/WixToolset.Data/RowDictionary.cs delete mode 100644 src/WixToolset.Data/RowIndexedList.cs delete mode 100644 src/WixToolset.Data/RowOperation.cs delete mode 100644 src/WixToolset.Data/Rows/BBControlRow.cs delete mode 100644 src/WixToolset.Data/Rows/ComponentRow.cs delete mode 100644 src/WixToolset.Data/Rows/ContainerType.cs delete mode 100644 src/WixToolset.Data/Rows/ControlRow.cs delete mode 100644 src/WixToolset.Data/Rows/ExitCodeBehaviorType.cs delete mode 100644 src/WixToolset.Data/Rows/FileAssemblyType.cs delete mode 100644 src/WixToolset.Data/Rows/FileRow.cs delete mode 100644 src/WixToolset.Data/Rows/MediaRow.cs delete mode 100644 src/WixToolset.Data/Rows/PatchAttributeType.cs delete mode 100644 src/WixToolset.Data/Rows/PropertyRow.cs delete mode 100644 src/WixToolset.Data/Rows/SummaryInfoRowCollection.cs delete mode 100644 src/WixToolset.Data/Rows/SymbolPathType.cs delete mode 100644 src/WixToolset.Data/Rows/UpgradeRow.cs delete mode 100644 src/WixToolset.Data/Rows/WixActionRow.cs delete mode 100644 src/WixToolset.Data/Rows/WixActionRowCollection.cs delete mode 100644 src/WixToolset.Data/Rows/WixApprovedExeForElevationRow.cs delete mode 100644 src/WixToolset.Data/Rows/WixBundleCatalogRow.cs delete mode 100644 src/WixToolset.Data/Rows/WixBundleContainerRow.cs delete mode 100644 src/WixToolset.Data/Rows/WixBundleExePackageAttributes.cs delete mode 100644 src/WixToolset.Data/Rows/WixBundleExePackageRow.cs delete mode 100644 src/WixToolset.Data/Rows/WixBundleMsiFeatureRow.cs delete mode 100644 src/WixToolset.Data/Rows/WixBundleMsiPackageAttributes.cs delete mode 100644 src/WixToolset.Data/Rows/WixBundleMsiPackageRow.cs delete mode 100644 src/WixToolset.Data/Rows/WixBundleMsiPropertyRow.cs delete mode 100644 src/WixToolset.Data/Rows/WixBundleMspPackageAttributes.cs delete mode 100644 src/WixToolset.Data/Rows/WixBundleMspPackageRow.cs delete mode 100644 src/WixToolset.Data/Rows/WixBundleMsuPackageRow.cs delete mode 100644 src/WixToolset.Data/Rows/WixBundlePackageAttributes.cs delete mode 100644 src/WixToolset.Data/Rows/WixBundlePackageCommandLineRow.cs delete mode 100644 src/WixToolset.Data/Rows/WixBundlePackageExitCodeRow.cs delete mode 100644 src/WixToolset.Data/Rows/WixBundlePackageRow.cs delete mode 100644 src/WixToolset.Data/Rows/WixBundlePackageType.cs delete mode 100644 src/WixToolset.Data/Rows/WixBundlePatchTargetCodeRow.cs delete mode 100644 src/WixToolset.Data/Rows/WixBundlePayloadRow.cs delete mode 100644 src/WixToolset.Data/Rows/WixBundleRelatedPackageRow.cs delete mode 100644 src/WixToolset.Data/Rows/WixBundleRollbackBoundaryRow.cs delete mode 100644 src/WixToolset.Data/Rows/WixBundleRow.cs delete mode 100644 src/WixToolset.Data/Rows/WixBundleSlipstreamMspRow.cs delete mode 100644 src/WixToolset.Data/Rows/WixBundleUpdateRow.cs delete mode 100644 src/WixToolset.Data/Rows/WixBundleVariableRow.cs delete mode 100644 src/WixToolset.Data/Rows/WixChainAttributes.cs delete mode 100644 src/WixToolset.Data/Rows/WixChainItemRow.cs delete mode 100644 src/WixToolset.Data/Rows/WixChainRow.cs delete mode 100644 src/WixToolset.Data/Rows/WixComplexReferenceRow.cs delete mode 100644 src/WixToolset.Data/Rows/WixDeltaPatchFileRow.cs delete mode 100644 src/WixToolset.Data/Rows/WixDeltaPatchSymbolPathsRow.cs delete mode 100644 src/WixToolset.Data/Rows/WixFileRow.cs delete mode 100644 src/WixToolset.Data/Rows/WixGroupRow.cs delete mode 100644 src/WixToolset.Data/Rows/WixMediaRow.cs delete mode 100644 src/WixToolset.Data/Rows/WixMediaTemplateRow.cs delete mode 100644 src/WixToolset.Data/Rows/WixMergeRow.cs delete mode 100644 src/WixToolset.Data/Rows/WixPayloadPropertiesRow.cs delete mode 100644 src/WixToolset.Data/Rows/WixPropertyRow.cs delete mode 100644 src/WixToolset.Data/Rows/WixRelatedBundleRow.cs delete mode 100644 src/WixToolset.Data/Rows/WixSimpleReferenceRow.cs delete mode 100644 src/WixToolset.Data/Rows/WixUpdateRegistrationRow.cs delete mode 100644 src/WixToolset.Data/Rows/WixVariableRow.cs create mode 100644 src/WixToolset.Data/SimpleTupleDefinitionCreator.cs delete mode 100644 src/WixToolset.Data/SubStorage.cs delete mode 100644 src/WixToolset.Data/Table.cs delete mode 100644 src/WixToolset.Data/TableDefinition.cs delete mode 100644 src/WixToolset.Data/TableDefinitionCollection.cs delete mode 100644 src/WixToolset.Data/TableExtensions.cs delete mode 100644 src/WixToolset.Data/TableIndexedCollection.cs delete mode 100644 src/WixToolset.Data/TableOperation.cs create mode 100644 src/WixToolset.Data/Tuples/ActionTextTuple.cs create mode 100644 src/WixToolset.Data/Tuples/AdminExecuteSequenceTuple.cs create mode 100644 src/WixToolset.Data/Tuples/AdminUISequenceTuple.cs create mode 100644 src/WixToolset.Data/Tuples/AdvtExecuteSequenceTuple.cs create mode 100644 src/WixToolset.Data/Tuples/AppIdTuple.cs create mode 100644 src/WixToolset.Data/Tuples/AppSearchTuple.cs create mode 100644 src/WixToolset.Data/Tuples/BBControlTuple.cs create mode 100644 src/WixToolset.Data/Tuples/BillboardTuple.cs create mode 100644 src/WixToolset.Data/Tuples/BinaryTuple.cs create mode 100644 src/WixToolset.Data/Tuples/BindImageTuple.cs create mode 100644 src/WixToolset.Data/Tuples/CCPSearchTuple.cs create mode 100644 src/WixToolset.Data/Tuples/CheckBoxTuple.cs create mode 100644 src/WixToolset.Data/Tuples/ClassTuple.cs create mode 100644 src/WixToolset.Data/Tuples/ComboBoxTuple.cs create mode 100644 src/WixToolset.Data/Tuples/CompLocatorTuple.cs create mode 100644 src/WixToolset.Data/Tuples/ComplusTuple.cs create mode 100644 src/WixToolset.Data/Tuples/ComponentTuple.cs create mode 100644 src/WixToolset.Data/Tuples/ConditionTuple.cs create mode 100644 src/WixToolset.Data/Tuples/ControlConditionTuple.cs create mode 100644 src/WixToolset.Data/Tuples/ControlEventTuple.cs create mode 100644 src/WixToolset.Data/Tuples/ControlTuple.cs create mode 100644 src/WixToolset.Data/Tuples/CreateFolderTuple.cs create mode 100644 src/WixToolset.Data/Tuples/CustomActionTuple.cs create mode 100644 src/WixToolset.Data/Tuples/DialogTuple.cs create mode 100644 src/WixToolset.Data/Tuples/DirectoryTuple.cs create mode 100644 src/WixToolset.Data/Tuples/DrLocatorTuple.cs create mode 100644 src/WixToolset.Data/Tuples/DuplicateFileTuple.cs create mode 100644 src/WixToolset.Data/Tuples/EnvironmentTuple.cs create mode 100644 src/WixToolset.Data/Tuples/ErrorTuple.cs create mode 100644 src/WixToolset.Data/Tuples/EventMappingTuple.cs create mode 100644 src/WixToolset.Data/Tuples/ExtensionTuple.cs create mode 100644 src/WixToolset.Data/Tuples/ExternalFilesTuple.cs create mode 100644 src/WixToolset.Data/Tuples/FamilyFileRangesTuple.cs create mode 100644 src/WixToolset.Data/Tuples/FeatureComponentsTuple.cs create mode 100644 src/WixToolset.Data/Tuples/FeatureTuple.cs create mode 100644 src/WixToolset.Data/Tuples/FileSFPCatalogTuple.cs create mode 100644 src/WixToolset.Data/Tuples/FileTuple.cs create mode 100644 src/WixToolset.Data/Tuples/FontTuple.cs create mode 100644 src/WixToolset.Data/Tuples/IconTuple.cs create mode 100644 src/WixToolset.Data/Tuples/ImageFamiliesTuple.cs create mode 100644 src/WixToolset.Data/Tuples/IniFileTuple.cs create mode 100644 src/WixToolset.Data/Tuples/IniLocatorTuple.cs create mode 100644 src/WixToolset.Data/Tuples/InstallExecuteSequenceTuple.cs create mode 100644 src/WixToolset.Data/Tuples/InstallUISequenceTuple.cs create mode 100644 src/WixToolset.Data/Tuples/IsolatedComponentTuple.cs create mode 100644 src/WixToolset.Data/Tuples/LaunchConditionTuple.cs create mode 100644 src/WixToolset.Data/Tuples/ListBoxTuple.cs create mode 100644 src/WixToolset.Data/Tuples/ListViewTuple.cs create mode 100644 src/WixToolset.Data/Tuples/LockPermissionsTuple.cs create mode 100644 src/WixToolset.Data/Tuples/MIMETuple.cs create mode 100644 src/WixToolset.Data/Tuples/MediaTuple.cs create mode 100644 src/WixToolset.Data/Tuples/ModuleAdminExecuteSequenceTuple.cs create mode 100644 src/WixToolset.Data/Tuples/ModuleAdminUISequenceTuple.cs create mode 100644 src/WixToolset.Data/Tuples/ModuleAdvtExecuteSequenceTuple.cs create mode 100644 src/WixToolset.Data/Tuples/ModuleComponentsTuple.cs create mode 100644 src/WixToolset.Data/Tuples/ModuleConfigurationTuple.cs create mode 100644 src/WixToolset.Data/Tuples/ModuleDependencyTuple.cs create mode 100644 src/WixToolset.Data/Tuples/ModuleExclusionTuple.cs create mode 100644 src/WixToolset.Data/Tuples/ModuleIgnoreTableTuple.cs create mode 100644 src/WixToolset.Data/Tuples/ModuleInstallExecuteSequenceTuple.cs create mode 100644 src/WixToolset.Data/Tuples/ModuleInstallUISequenceTuple.cs create mode 100644 src/WixToolset.Data/Tuples/ModuleSignatureTuple.cs create mode 100644 src/WixToolset.Data/Tuples/ModuleSubstitutionTuple.cs create mode 100644 src/WixToolset.Data/Tuples/MoveFileTuple.cs create mode 100644 src/WixToolset.Data/Tuples/MsiAssemblyNameTuple.cs create mode 100644 src/WixToolset.Data/Tuples/MsiAssemblyTuple.cs create mode 100644 src/WixToolset.Data/Tuples/MsiDigitalCertificateTuple.cs create mode 100644 src/WixToolset.Data/Tuples/MsiDigitalSignatureTuple.cs create mode 100644 src/WixToolset.Data/Tuples/MsiEmbeddedChainerTuple.cs create mode 100644 src/WixToolset.Data/Tuples/MsiEmbeddedUITuple.cs create mode 100644 src/WixToolset.Data/Tuples/MsiFileHashTuple.cs create mode 100644 src/WixToolset.Data/Tuples/MsiLockPermissionsExTuple.cs create mode 100644 src/WixToolset.Data/Tuples/MsiPackageCertificateTuple.cs create mode 100644 src/WixToolset.Data/Tuples/MsiPatchCertificateTuple.cs create mode 100644 src/WixToolset.Data/Tuples/MsiPatchHeadersTuple.cs create mode 100644 src/WixToolset.Data/Tuples/MsiPatchMetadataTuple.cs create mode 100644 src/WixToolset.Data/Tuples/MsiPatchOldAssemblyFileTuple.cs create mode 100644 src/WixToolset.Data/Tuples/MsiPatchOldAssemblyNameTuple.cs create mode 100644 src/WixToolset.Data/Tuples/MsiPatchSequenceTuple.cs create mode 100644 src/WixToolset.Data/Tuples/MsiServiceConfigFailureActionsTuple.cs create mode 100644 src/WixToolset.Data/Tuples/MsiServiceConfigTuple.cs create mode 100644 src/WixToolset.Data/Tuples/MsiShortcutPropertyTuple.cs create mode 100644 src/WixToolset.Data/Tuples/ODBCAttributeTuple.cs create mode 100644 src/WixToolset.Data/Tuples/ODBCDataSourceTuple.cs create mode 100644 src/WixToolset.Data/Tuples/ODBCDriverTuple.cs create mode 100644 src/WixToolset.Data/Tuples/ODBCSourceAttributeTuple.cs create mode 100644 src/WixToolset.Data/Tuples/ODBCTranslatorTuple.cs create mode 100644 src/WixToolset.Data/Tuples/PatchMetadataTuple.cs create mode 100644 src/WixToolset.Data/Tuples/PatchPackageTuple.cs create mode 100644 src/WixToolset.Data/Tuples/PatchSequenceTuple.cs create mode 100644 src/WixToolset.Data/Tuples/PatchTuple.cs create mode 100644 src/WixToolset.Data/Tuples/ProgIdTuple.cs create mode 100644 src/WixToolset.Data/Tuples/PropertiesTuple.cs create mode 100644 src/WixToolset.Data/Tuples/PropertyTuple.cs create mode 100644 src/WixToolset.Data/Tuples/PublishComponentTuple.cs create mode 100644 src/WixToolset.Data/Tuples/RadioButtonTuple.cs create mode 100644 src/WixToolset.Data/Tuples/RegLocatorTuple.cs create mode 100644 src/WixToolset.Data/Tuples/RegistryTuple.cs create mode 100644 src/WixToolset.Data/Tuples/RemoveFileTuple.cs create mode 100644 src/WixToolset.Data/Tuples/RemoveIniFileTuple.cs create mode 100644 src/WixToolset.Data/Tuples/RemoveRegistryTuple.cs create mode 100644 src/WixToolset.Data/Tuples/ReserveCostTuple.cs create mode 100644 src/WixToolset.Data/Tuples/SFPCatalogTuple.cs create mode 100644 src/WixToolset.Data/Tuples/SelfRegTuple.cs create mode 100644 src/WixToolset.Data/Tuples/ServiceControlTuple.cs create mode 100644 src/WixToolset.Data/Tuples/ServiceInstallTuple.cs create mode 100644 src/WixToolset.Data/Tuples/ShortcutTuple.cs create mode 100644 src/WixToolset.Data/Tuples/SignatureTuple.cs create mode 100644 src/WixToolset.Data/Tuples/TargetFiles_OptionalDataTuple.cs create mode 100644 src/WixToolset.Data/Tuples/TargetImagesTuple.cs create mode 100644 src/WixToolset.Data/Tuples/TextStyleTuple.cs create mode 100644 src/WixToolset.Data/Tuples/TupleDefinitions.cs create mode 100644 src/WixToolset.Data/Tuples/TypeLibTuple.cs create mode 100644 src/WixToolset.Data/Tuples/UITextTuple.cs create mode 100644 src/WixToolset.Data/Tuples/UpgradeTuple.cs create mode 100644 src/WixToolset.Data/Tuples/UpgradedFilesToIgnoreTuple.cs create mode 100644 src/WixToolset.Data/Tuples/UpgradedFiles_OptionalDataTuple.cs create mode 100644 src/WixToolset.Data/Tuples/UpgradedImagesTuple.cs create mode 100644 src/WixToolset.Data/Tuples/VerbTuple.cs create mode 100644 src/WixToolset.Data/Tuples/WixActionTuple.cs create mode 100644 src/WixToolset.Data/Tuples/WixApprovedExeForElevationTuple.cs create mode 100644 src/WixToolset.Data/Tuples/WixBBControlTuple.cs create mode 100644 src/WixToolset.Data/Tuples/WixBindUpdatedFilesTuple.cs create mode 100644 src/WixToolset.Data/Tuples/WixBootstrapperApplicationTuple.cs create mode 100644 src/WixToolset.Data/Tuples/WixBuildInfoTuple.cs create mode 100644 src/WixToolset.Data/Tuples/WixBundleCatalogTuple.cs create mode 100644 src/WixToolset.Data/Tuples/WixBundleContainerTuple.cs create mode 100644 src/WixToolset.Data/Tuples/WixBundleExePackageTuple.cs create mode 100644 src/WixToolset.Data/Tuples/WixBundleMsiFeatureTuple.cs create mode 100644 src/WixToolset.Data/Tuples/WixBundleMsiPackageTuple.cs create mode 100644 src/WixToolset.Data/Tuples/WixBundleMsiPropertyTuple.cs create mode 100644 src/WixToolset.Data/Tuples/WixBundleMspPackageTuple.cs create mode 100644 src/WixToolset.Data/Tuples/WixBundleMsuPackageTuple.cs create mode 100644 src/WixToolset.Data/Tuples/WixBundlePackageCommandLineTuple.cs create mode 100644 src/WixToolset.Data/Tuples/WixBundlePackageExitCodeTuple.cs create mode 100644 src/WixToolset.Data/Tuples/WixBundlePackageGroupTuple.cs create mode 100644 src/WixToolset.Data/Tuples/WixBundlePackageTuple.cs create mode 100644 src/WixToolset.Data/Tuples/WixBundlePatchTargetCodeTuple.cs create mode 100644 src/WixToolset.Data/Tuples/WixBundlePayloadGroupTuple.cs create mode 100644 src/WixToolset.Data/Tuples/WixBundlePayloadTuple.cs create mode 100644 src/WixToolset.Data/Tuples/WixBundlePropertiesTuple.cs create mode 100644 src/WixToolset.Data/Tuples/WixBundleRelatedPackageTuple.cs create mode 100644 src/WixToolset.Data/Tuples/WixBundleRollbackBoundaryTuple.cs create mode 100644 src/WixToolset.Data/Tuples/WixBundleSlipstreamMspTuple.cs create mode 100644 src/WixToolset.Data/Tuples/WixBundleTuple.cs create mode 100644 src/WixToolset.Data/Tuples/WixBundleUpdateTuple.cs create mode 100644 src/WixToolset.Data/Tuples/WixBundleVariableTuple.cs create mode 100644 src/WixToolset.Data/Tuples/WixChainItemTuple.cs create mode 100644 src/WixToolset.Data/Tuples/WixChainTuple.cs create mode 100644 src/WixToolset.Data/Tuples/WixComplexReferenceTuple.cs create mode 100644 src/WixToolset.Data/Tuples/WixComponentGroupTuple.cs create mode 100644 src/WixToolset.Data/Tuples/WixComponentSearchTuple.cs create mode 100644 src/WixToolset.Data/Tuples/WixControlTuple.cs create mode 100644 src/WixToolset.Data/Tuples/WixCustomRowTuple.cs create mode 100644 src/WixToolset.Data/Tuples/WixCustomTableTuple.cs create mode 100644 src/WixToolset.Data/Tuples/WixDeltaPatchFileTuple.cs create mode 100644 src/WixToolset.Data/Tuples/WixDeltaPatchSymbolPathsTuple.cs create mode 100644 src/WixToolset.Data/Tuples/WixDirectoryTuple.cs create mode 100644 src/WixToolset.Data/Tuples/WixEnsureTableTuple.cs create mode 100644 src/WixToolset.Data/Tuples/WixFeatureGroupTuple.cs create mode 100644 src/WixToolset.Data/Tuples/WixFeatureModulesTuple.cs create mode 100644 src/WixToolset.Data/Tuples/WixFileSearchTuple.cs create mode 100644 src/WixToolset.Data/Tuples/WixFileTuple.cs create mode 100644 src/WixToolset.Data/Tuples/WixFragmentTuple.cs create mode 100644 src/WixToolset.Data/Tuples/WixGroupTuple.cs create mode 100644 src/WixToolset.Data/Tuples/WixInstanceComponentTuple.cs create mode 100644 src/WixToolset.Data/Tuples/WixInstanceTransformsTuple.cs create mode 100644 src/WixToolset.Data/Tuples/WixMediaTemplateTuple.cs create mode 100644 src/WixToolset.Data/Tuples/WixMediaTuple.cs create mode 100644 src/WixToolset.Data/Tuples/WixMergeTuple.cs create mode 100644 src/WixToolset.Data/Tuples/WixOrderingTuple.cs create mode 100644 src/WixToolset.Data/Tuples/WixPackageFeatureInfoTuple.cs create mode 100644 src/WixToolset.Data/Tuples/WixPackagePropertiesTuple.cs create mode 100644 src/WixToolset.Data/Tuples/WixPatchBaselineTuple.cs create mode 100644 src/WixToolset.Data/Tuples/WixPatchFamilyGroupTuple.cs create mode 100644 src/WixToolset.Data/Tuples/WixPatchIdTuple.cs create mode 100644 src/WixToolset.Data/Tuples/WixPatchMetadataTuple.cs create mode 100644 src/WixToolset.Data/Tuples/WixPatchRefTuple.cs create mode 100644 src/WixToolset.Data/Tuples/WixPatchTargetTuple.cs create mode 100644 src/WixToolset.Data/Tuples/WixPayloadPropertiesTuple.cs create mode 100644 src/WixToolset.Data/Tuples/WixProductSearchTuple.cs create mode 100644 src/WixToolset.Data/Tuples/WixPropertyTuple.cs create mode 100644 src/WixToolset.Data/Tuples/WixRegistrySearchTuple.cs create mode 100644 src/WixToolset.Data/Tuples/WixRelatedBundleTuple.cs create mode 100644 src/WixToolset.Data/Tuples/WixSearchRelationTuple.cs create mode 100644 src/WixToolset.Data/Tuples/WixSearchTuple.cs create mode 100644 src/WixToolset.Data/Tuples/WixSimpleReferenceTuple.cs create mode 100644 src/WixToolset.Data/Tuples/WixSuppressActionTuple.cs create mode 100644 src/WixToolset.Data/Tuples/WixSuppressModularizationTuple.cs create mode 100644 src/WixToolset.Data/Tuples/WixUITuple.cs create mode 100644 src/WixToolset.Data/Tuples/WixUpdateRegistrationTuple.cs create mode 100644 src/WixToolset.Data/Tuples/WixVariableTuple.cs create mode 100644 src/WixToolset.Data/Tuples/_ByHandComponentTuple.cs create mode 100644 src/WixToolset.Data/Tuples/_ByHandFileTuple.cs create mode 100644 src/WixToolset.Data/Tuples/_ByHandTupleDefinitions.cs create mode 100644 src/WixToolset.Data/Tuples/_StreamsTuple.cs create mode 100644 src/WixToolset.Data/Tuples/_SummaryInformationTuple.cs create mode 100644 src/WixToolset.Data/Tuples/_TransformViewTuple.cs create mode 100644 src/WixToolset.Data/Tuples/_ValidationTuple.cs create mode 100644 src/WixToolset.Data/Tuples/tuples_new.json delete mode 100644 src/WixToolset.Data/WindowsInstallerStandard.cs delete mode 100644 src/WixToolset.Data/WixInvalidIdtException.cs delete mode 100644 src/WixToolset.Data/WixMissingTableDefinitionException.cs create mode 100644 src/test/WixToolsetTest.Data/TupleDefinitionFixture.cs create mode 100644 src/test/WixToolsetTest.Data/WixToolsetTest.Data.csproj (limited to 'src') diff --git a/src/WixToolset.Data/AssemblyInfo.cs b/src/WixToolset.Data/AssemblyInfo.cs index 6512230a..b3740b2a 100644 --- a/src/WixToolset.Data/AssemblyInfo.cs +++ b/src/WixToolset.Data/AssemblyInfo.cs @@ -5,5 +5,5 @@ using System.Reflection; using System.Runtime.InteropServices; [assembly: AssemblyCulture("")] -[assembly:CLSCompliant(true)] +[assembly: CLSCompliant(true)] [assembly: ComVisible(false)] diff --git a/src/WixToolset.Data/Bind/BindPath.cs b/src/WixToolset.Data/Bind/BindPath.cs new file mode 100644 index 00000000..823a57c9 --- /dev/null +++ b/src/WixToolset.Data/Bind/BindPath.cs @@ -0,0 +1,60 @@ +// Copyright (c) .NET 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.Data +{ + using System; + using WixToolset.Data.Bind; + + /// + /// Bind path representation. + /// + public class BindPath + { + /// + /// Creates an unnamed bind path. + /// + /// Path for the bind path. + public BindPath(string path) : this(String.Empty, path, BindStage.Normal) + { + } + + /// + /// Creates a named bind path. + /// + /// Name of the bind path. + /// Path for the bind path. + /// Stage for the bind path. + public BindPath(string name, string path, BindStage stage = BindStage.Normal) + { + this.Name = name; + this.Path = path; + this.Stage = stage; + } + + /// + /// Name of the bind path or String.Empty if the path is unnamed. + /// + public string Name { get; set; } + + /// + /// Path for the bind path. + /// + public string Path { get; set; } + + /// + /// Stage for the bind path. + /// + public BindStage Stage { get; set; } + + /// + /// Parses a normal bind path from its string representation + /// + /// String representation of bind path that looks like: [name=]path + /// Parsed normal bind path. + public static BindPath Parse(string bindPath) + { + string[] namedPath = bindPath.Split(new char[] { '=' }, 2); + return (1 == namedPath.Length) ? new BindPath(namedPath[0]) : new BindPath(namedPath[0], namedPath[1]); + } + } +} diff --git a/src/WixToolset.Data/Bind/BindVariable.cs b/src/WixToolset.Data/Bind/BindVariable.cs new file mode 100644 index 00000000..06c004e1 --- /dev/null +++ b/src/WixToolset.Data/Bind/BindVariable.cs @@ -0,0 +1,33 @@ +// Copyright (c) .NET 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.Data.Rows +{ + /// + /// Specialization of a row for the WixVariable table. + /// + public sealed class BindVariable + { + /// + /// Gets or sets the source line number. + /// + public SourceLineNumber SourceLineNumbers { get; set; } + + /// + /// Gets or sets the variable identifier. + /// + /// The variable identifier. + public string Id { get; set; } + + /// + /// Gets or sets the variable's value. + /// + /// The variable's value. + public string Value { get; set; } + + /// + /// Gets or sets whether this variable is overridable. + /// + /// Whether this variable is overridable. + public bool Overridable { get; set; } + } +} diff --git a/src/WixToolset.Data/BindPath.cs b/src/WixToolset.Data/BindPath.cs deleted file mode 100644 index 823a57c9..00000000 --- a/src/WixToolset.Data/BindPath.cs +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Data -{ - using System; - using WixToolset.Data.Bind; - - /// - /// Bind path representation. - /// - public class BindPath - { - /// - /// Creates an unnamed bind path. - /// - /// Path for the bind path. - public BindPath(string path) : this(String.Empty, path, BindStage.Normal) - { - } - - /// - /// Creates a named bind path. - /// - /// Name of the bind path. - /// Path for the bind path. - /// Stage for the bind path. - public BindPath(string name, string path, BindStage stage = BindStage.Normal) - { - this.Name = name; - this.Path = path; - this.Stage = stage; - } - - /// - /// Name of the bind path or String.Empty if the path is unnamed. - /// - public string Name { get; set; } - - /// - /// Path for the bind path. - /// - public string Path { get; set; } - - /// - /// Stage for the bind path. - /// - public BindStage Stage { get; set; } - - /// - /// Parses a normal bind path from its string representation - /// - /// String representation of bind path that looks like: [name=]path - /// Parsed normal bind path. - public static BindPath Parse(string bindPath) - { - string[] namedPath = bindPath.Split(new char[] { '=' }, 2); - return (1 == namedPath.Length) ? new BindPath(namedPath[0]) : new BindPath(namedPath[0], namedPath[1]); - } - } -} diff --git a/src/WixToolset.Data/ColumnDefinition.cs b/src/WixToolset.Data/ColumnDefinition.cs deleted file mode 100644 index 7e5a07c5..00000000 --- a/src/WixToolset.Data/ColumnDefinition.cs +++ /dev/null @@ -1,1032 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Data -{ - using System; - using System.Globalization; - using System.Xml; - - /// - /// Defines MSI column types. - /// - public enum ColumnType - { - /// Unknown column type, default and invalid. - Unknown, - - /// Column is a string. - String, - - /// Column is a localizable string. - Localized, - - /// Column is a number. - Number, - - /// Column is a binary stream. - Object, - - /// Column is a string that is preserved in transforms (like Object). - Preserved, - } - - /// - /// Specifies if the column should be modularized. - /// - public enum ColumnModularizeType - { - /// Column should not be modularized. - None, - - /// Column should be modularized. - Column, - - /// When the column is an primary or foreign key to the Icon table it should be modularized special. - Icon, - - /// When the column is a companion file it should be modularized. - CompanionFile, - - /// Column is a condition and should be modularized. - Condition, - - /// Special modularization type for the ControlEvent table's Argument column. - ControlEventArgument, - - /// Special modularization type for the Control table's Text column. - ControlText, - - /// Any Properties in the column should be modularized. - Property, - - /// Semi-colon list of keys, all of which need to be modularized. - SemicolonDelimited, - } - - /// - /// Column validation category type - /// - public enum ColumnCategory - { - /// Unknown category, default and invalid. - Unknown, - - /// Text category. - Text, - - /// UpperCase category. - UpperCase, - - /// LowerCase category. - LowerCase, - - /// Integer category. - Integer, - - /// DoubleInteger category. - DoubleInteger, - - /// TimeDate category. - TimeDate, - - /// Identifier category. - Identifier, - - /// Property category. - Property, - - /// Filename category. - Filename, - - /// WildCardFilename category. - WildCardFilename, - - /// Path category. - Path, - - /// Paths category. - Paths, - - /// AnyPath category. - AnyPath, - - /// DefaultDir category. - DefaultDir, - - /// RegPath category. - RegPath, - - /// Formatted category. - Formatted, - - /// Template category. - Template, - - /// Condition category. - Condition, - - /// Guid category. - Guid, - - /// Version category. - Version, - - /// Language category. - Language, - - /// Binary category. - Binary, - - /// CustomSource category. - CustomSource, - - /// Cabinet category. - Cabinet, - - /// Shortcut category. - Shortcut, - - /// Formatted SDDL category. - FormattedSDDLText, - } - - /// - /// Definition of a table's column. - /// - public sealed class ColumnDefinition : IComparable - { - private string name; - private ColumnType type; - private int length; - private bool primaryKey; - private bool nullable; - private ColumnModularizeType modularize; - private bool localizable; - private bool added; - - private bool minValueSet; - private long minValue; - private bool maxValueSet; - private long maxValue; - private string keyTable; - private bool keyColumnSet; - private int keyColumn; - private ColumnCategory category; - private string possibilities; - private string description; - private bool escapeIdtCharacters; - private bool useCData; - - /// - /// Creates a new column definition. - /// - /// Name of column. - /// Type of column - /// Length of column. - /// If column is primary key. - /// If column is nullable. - /// Type of modularization for column - /// If the column is localizable. - /// If the minimum of the value was set. - /// Minimum value for the column. - /// If the maximum value was set. - /// Maximum value for the colum. - /// Optional name of table for foreign key. - /// If the key column was set. - /// Optional name of column for foreign key. - /// Validation category for column. - /// Set of possible values for column. - /// Description of column in vaidation table. - /// If characters should be escaped in IDT. - /// If whitespace should be preserved in a CDATA node. - public ColumnDefinition(string name, ColumnType type, int length, bool primaryKey, bool nullable, ColumnModularizeType modularizeType, bool localizable, bool minValueSet, long minValue, bool maxValueSet, long maxValue, string keyTable, bool keyColumnSet, int keyColumn, ColumnCategory category, string possibilities, string description, bool escapeIdtCharacters, bool useCData) - { - this.name = name; - this.type = type; - this.length = length; - this.primaryKey = primaryKey; - this.nullable = nullable; - this.modularize = modularizeType; - this.localizable = localizable; - this.minValueSet = minValueSet; - this.minValue = minValue; - this.maxValueSet = maxValueSet; - this.maxValue = maxValue; - this.keyTable = keyTable; - this.keyColumnSet = keyColumnSet; - this.keyColumn = keyColumn; - this.category = category; - this.possibilities = possibilities; - this.description = description; - this.escapeIdtCharacters = escapeIdtCharacters; - this.useCData = useCData; - } - - /// - /// Gets whether this column was added via a transform. - /// - /// Whether this column was added via a transform. - public bool Added - { - get { return this.added; } - set { this.added = value; } - } - - /// - /// Gets the name of the column. - /// - /// Name of column. - public string Name - { - get { return this.name; } - } - - /// - /// Gets the type of the column. - /// - /// Type of column. - public ColumnType Type - { - get { return this.type; } - } - - /// - /// Gets the length of the column. - /// - /// Length of column. - public int Length - { - get { return this.length; } - } - - /// - /// Gets if the column is a primary key. - /// - /// true if column is primary key. - public bool PrimaryKey - { - get { return this.primaryKey; } - } - - /// - /// Gets if the column is nullable. - /// - /// true if column is nullable. - public bool Nullable - { - get { return this.nullable; } - } - - /// - /// Gets the type of modularization for this column. - /// - /// Column's modularization type. - public ColumnModularizeType ModularizeType - { - get { return this.modularize; } - } - - /// - /// Gets if the column is localizable. Can be because the type is localizable, or because the column - /// was explicitly set to be so. - /// - /// true if column is localizable. - public bool IsLocalizable - { - get { return this.localizable || ColumnType.Localized == this.Type; } - } - - /// - /// Gets if the minimum value of the column is set. - /// - /// true if minimum value is set. - public bool IsMinValueSet - { - get { return this.minValueSet; } - } - - /// - /// Gets the minimum value for the column, only valid if IsMinValueSet returns true. - /// - /// Minimum value for the column. - public long MinValue - { - get { return this.minValue; } - } - - /// - /// Gets if the maximum value of the column is set. - /// - /// true if maximum value is set. - public bool IsMaxValueSet - { - get { return this.maxValueSet; } - } - - /// - /// Gets the maximum value for the column, only valid if IsMinValueSet returns true. - /// - /// Maximum value for the column. - public long MaxValue - { - get { return this.maxValue; } - } - - /// - /// Gets the table that has the foreign key for this column - /// - /// Foreign key table name. - public string KeyTable - { - get { return this.keyTable; } - } - - /// - /// Gets if the key column is set. - /// - /// True if the key column is set. - public bool IsKeyColumnSet - { - get { return this.keyColumnSet; } - } - - /// - /// Gets the foreign key column that this column refers to. - /// - /// Foreign key column. - public int KeyColumn - { - get { return this.keyColumn; } - } - - /// - /// Gets the validation category for this column. - /// - /// Validation category. - public ColumnCategory Category - { - get { return this.category; } - } - - /// - /// Gets the set of possibilities for this column. - /// - /// Set of possibilities for this column. - public string Possibilities - { - get { return this.possibilities; } - } - - /// - /// Gets the description for this column. - /// - /// Description of column. - public string Description - { - get { return this.description; } - } - - /// - /// Gets if characters should be escaped to fit into IDT. - /// - /// true if data should be escaped when adding to IDT. - public bool EscapeIdtCharacters - { - get { return this.escapeIdtCharacters; } - } - - /// - /// Gets if whitespace should be preserved in a CDATA node. - /// - /// true if whitespace should be preserved in a CDATA node. - public bool UseCData - { - get { return this.useCData; } - } - - /// - /// Gets the type of the column in IDT format. - /// - /// IDT format for column type. - public string IdtType - { - get - { - char typeCharacter; - switch (this.type) - { - case ColumnType.Number: - typeCharacter = this.nullable ? 'I' : 'i'; - break; - case ColumnType.Preserved: - case ColumnType.String: - typeCharacter = this.nullable ? 'S' : 's'; - break; - case ColumnType.Localized: - typeCharacter = this.nullable ? 'L' : 'l'; - break; - case ColumnType.Object: - typeCharacter = this.nullable ? 'V' : 'v'; - break; - default: - throw new InvalidOperationException(String.Format(CultureInfo.CurrentUICulture, WixDataStrings.EXP_UnknownColumnType, this.type)); - } - - return String.Concat(typeCharacter, this.length); - } - } - - /// - /// Parses a column definition in a table definition. - /// - /// Reader to get data from. - /// The ColumnDefintion represented by the Xml. - internal static ColumnDefinition Read(XmlReader reader) - { - if (!reader.LocalName.Equals("columnDefinition")) - { - throw new XmlException(); - } - - bool added = false; - ColumnCategory category = ColumnCategory.Unknown; - string description = null; - bool empty = reader.IsEmptyElement; - bool escapeIdtCharacters = false; - int keyColumn = -1; - bool keyColumnSet = false; - string keyTable = null; - int length = -1; - bool localizable = false; - long maxValue = 0; - bool maxValueSet = false; - long minValue = 0; - bool minValueSet = false; - ColumnModularizeType modularize = ColumnModularizeType.None; - string name = null; - bool nullable = false; - string possibilities = null; - bool primaryKey = false; - ColumnType type = ColumnType.Unknown; - bool useCData = false; - - // parse the attributes - while (reader.MoveToNextAttribute()) - { - switch (reader.LocalName) - { - case "added": - added = reader.Value.Equals("yes"); - break; - case "category": - switch (reader.Value) - { - case "anyPath": - category = ColumnCategory.AnyPath; - break; - case "binary": - category = ColumnCategory.Binary; - break; - case "cabinet": - category = ColumnCategory.Cabinet; - break; - case "condition": - category = ColumnCategory.Condition; - break; - case "customSource": - category = ColumnCategory.CustomSource; - break; - case "defaultDir": - category = ColumnCategory.DefaultDir; - break; - case "doubleInteger": - category = ColumnCategory.DoubleInteger; - break; - case "filename": - category = ColumnCategory.Filename; - break; - case "formatted": - category = ColumnCategory.Formatted; - break; - case "formattedSddl": - category = ColumnCategory.FormattedSDDLText; - break; - case "guid": - category = ColumnCategory.Guid; - break; - case "identifier": - category = ColumnCategory.Identifier; - break; - case "integer": - category = ColumnCategory.Integer; - break; - case "language": - category = ColumnCategory.Language; - break; - case "lowerCase": - category = ColumnCategory.LowerCase; - break; - case "path": - category = ColumnCategory.Path; - break; - case "paths": - category = ColumnCategory.Paths; - break; - case "property": - category = ColumnCategory.Property; - break; - case "regPath": - category = ColumnCategory.RegPath; - break; - case "shortcut": - category = ColumnCategory.Shortcut; - break; - case "template": - category = ColumnCategory.Template; - break; - case "text": - category = ColumnCategory.Text; - break; - case "timeDate": - category = ColumnCategory.TimeDate; - break; - case "upperCase": - category = ColumnCategory.UpperCase; - break; - case "version": - category = ColumnCategory.Version; - break; - case "wildCardFilename": - category = ColumnCategory.WildCardFilename; - break; - default: - throw new InvalidOperationException(); - } - break; - case "description": - description = reader.Value; - break; - case "escapeIdtCharacters": - escapeIdtCharacters = reader.Value.Equals("yes"); - break; - case "keyColumn": - keyColumnSet = true; - keyColumn = Convert.ToInt32(reader.Value, 10); - break; - case "keyTable": - keyTable = reader.Value; - break; - case "length": - length = Convert.ToInt32(reader.Value, 10); - break; - case "localizable": - localizable = reader.Value.Equals("yes"); - break; - case "maxValue": - maxValueSet = true; - maxValue = Convert.ToInt32(reader.Value, 10); - break; - case "minValue": - minValueSet = true; - minValue = Convert.ToInt32(reader.Value, 10); - break; - case "modularize": - switch (reader.Value) - { - case "column": - modularize = ColumnModularizeType.Column; - break; - case "companionFile": - modularize = ColumnModularizeType.CompanionFile; - break; - case "condition": - modularize = ColumnModularizeType.Condition; - break; - case "controlEventArgument": - modularize = ColumnModularizeType.ControlEventArgument; - break; - case "controlText": - modularize = ColumnModularizeType.ControlText; - break; - case "icon": - modularize = ColumnModularizeType.Icon; - break; - case "none": - modularize = ColumnModularizeType.None; - break; - case "property": - modularize = ColumnModularizeType.Property; - break; - case "semicolonDelimited": - modularize = ColumnModularizeType.SemicolonDelimited; - break; - default: - throw new XmlException(); - } - break; - case "name": - switch (reader.Value) - { - case "CREATE": - case "DELETE": - case "DROP": - case "INSERT": - throw new XmlException(); - default: - name = reader.Value; - break; - } - break; - case "nullable": - nullable = reader.Value.Equals("yes"); - break; - case "primaryKey": - primaryKey = reader.Value.Equals("yes"); - break; - case "set": - possibilities = reader.Value; - break; - case "type": - switch (reader.Value) - { - case "localized": - type = ColumnType.Localized; - break; - case "number": - type = ColumnType.Number; - break; - case "object": - type = ColumnType.Object; - break; - case "string": - type = ColumnType.String; - break; - case "preserved": - type = ColumnType.Preserved; - break; - default: - throw new XmlException(); - } - break; - case "useCData": - useCData = reader.Value.Equals("yes"); - break; - } - } - - // parse the child elements (there should be none) - if (!empty) - { - bool done = false; - - while (!done && reader.Read()) - { - switch (reader.NodeType) - { - case XmlNodeType.Element: - throw new XmlException(); - case XmlNodeType.EndElement: - done = true; - break; - } - } - - if (!done) - { - throw new XmlException(); - } - } - - ColumnDefinition columnDefinition = new ColumnDefinition(name, type, length, primaryKey, nullable, modularize, localizable, minValueSet, minValue, maxValueSet, maxValue, keyTable, keyColumnSet, keyColumn, category, possibilities, description, escapeIdtCharacters, useCData); - columnDefinition.Added = added; - - return columnDefinition; - } - - /// - /// Persists a ColumnDefinition in an XML format. - /// - /// XmlWriter where the Output should persist itself as XML. - internal void Write(XmlWriter writer) - { - writer.WriteStartElement("columnDefinition", TableDefinitionCollection.XmlNamespaceUri); - - writer.WriteAttributeString("name", this.name); - - switch (this.type) - { - case ColumnType.Localized: - writer.WriteAttributeString("type", "localized"); - break; - case ColumnType.Number: - writer.WriteAttributeString("type", "number"); - break; - case ColumnType.Object: - writer.WriteAttributeString("type", "object"); - break; - case ColumnType.String: - writer.WriteAttributeString("type", "string"); - break; - case ColumnType.Preserved: - writer.WriteAttributeString("type", "preserved"); - break; - } - - writer.WriteAttributeString("length", this.length.ToString(CultureInfo.InvariantCulture.NumberFormat)); - - if (this.primaryKey) - { - writer.WriteAttributeString("primaryKey", "yes"); - } - - if (this.nullable) - { - writer.WriteAttributeString("nullable", "yes"); - } - - if (this.localizable) - { - writer.WriteAttributeString("localizable", "yes"); - } - - if (this.added) - { - writer.WriteAttributeString("added", "yes"); - } - - switch (this.modularize) - { - case ColumnModularizeType.Column: - writer.WriteAttributeString("modularize", "column"); - break; - case ColumnModularizeType.CompanionFile: - writer.WriteAttributeString("modularize", "companionFile"); - break; - case ColumnModularizeType.Condition: - writer.WriteAttributeString("modularize", "condition"); - break; - case ColumnModularizeType.ControlEventArgument: - writer.WriteAttributeString("modularize", "controlEventArgument"); - break; - case ColumnModularizeType.ControlText: - writer.WriteAttributeString("modularize", "controlText"); - break; - case ColumnModularizeType.Icon: - writer.WriteAttributeString("modularize", "icon"); - break; - case ColumnModularizeType.None: - // this is the default value - break; - case ColumnModularizeType.Property: - writer.WriteAttributeString("modularize", "property"); - break; - case ColumnModularizeType.SemicolonDelimited: - writer.WriteAttributeString("modularize", "semicolonDelimited"); - break; - } - - if (this.minValueSet) - { - writer.WriteAttributeString("minValue", this.minValue.ToString(CultureInfo.InvariantCulture.NumberFormat)); - } - - if (this.maxValueSet) - { - writer.WriteAttributeString("maxValue", this.maxValue.ToString(CultureInfo.InvariantCulture.NumberFormat)); - } - - if (!String.IsNullOrEmpty(this.keyTable)) - { - writer.WriteAttributeString("keyTable", this.keyTable); - } - - if (this.keyColumnSet) - { - writer.WriteAttributeString("keyColumn", this.keyColumn.ToString(CultureInfo.InvariantCulture.NumberFormat)); - } - - switch (this.category) - { - case ColumnCategory.AnyPath: - writer.WriteAttributeString("category", "anyPath"); - break; - case ColumnCategory.Binary: - writer.WriteAttributeString("category", "binary"); - break; - case ColumnCategory.Cabinet: - writer.WriteAttributeString("category", "cabinet"); - break; - case ColumnCategory.Condition: - writer.WriteAttributeString("category", "condition"); - break; - case ColumnCategory.CustomSource: - writer.WriteAttributeString("category", "customSource"); - break; - case ColumnCategory.DefaultDir: - writer.WriteAttributeString("category", "defaultDir"); - break; - case ColumnCategory.DoubleInteger: - writer.WriteAttributeString("category", "doubleInteger"); - break; - case ColumnCategory.Filename: - writer.WriteAttributeString("category", "filename"); - break; - case ColumnCategory.Formatted: - writer.WriteAttributeString("category", "formatted"); - break; - case ColumnCategory.FormattedSDDLText: - writer.WriteAttributeString("category", "formattedSddl"); - break; - case ColumnCategory.Guid: - writer.WriteAttributeString("category", "guid"); - break; - case ColumnCategory.Identifier: - writer.WriteAttributeString("category", "identifier"); - break; - case ColumnCategory.Integer: - writer.WriteAttributeString("category", "integer"); - break; - case ColumnCategory.Language: - writer.WriteAttributeString("category", "language"); - break; - case ColumnCategory.LowerCase: - writer.WriteAttributeString("category", "lowerCase"); - break; - case ColumnCategory.Path: - writer.WriteAttributeString("category", "path"); - break; - case ColumnCategory.Paths: - writer.WriteAttributeString("category", "paths"); - break; - case ColumnCategory.Property: - writer.WriteAttributeString("category", "property"); - break; - case ColumnCategory.RegPath: - writer.WriteAttributeString("category", "regPath"); - break; - case ColumnCategory.Shortcut: - writer.WriteAttributeString("category", "shortcut"); - break; - case ColumnCategory.Template: - writer.WriteAttributeString("category", "template"); - break; - case ColumnCategory.Text: - writer.WriteAttributeString("category", "text"); - break; - case ColumnCategory.TimeDate: - writer.WriteAttributeString("category", "timeDate"); - break; - case ColumnCategory.UpperCase: - writer.WriteAttributeString("category", "upperCase"); - break; - case ColumnCategory.Version: - writer.WriteAttributeString("category", "version"); - break; - case ColumnCategory.WildCardFilename: - writer.WriteAttributeString("category", "wildCardFilename"); - break; - } - - if (!String.IsNullOrEmpty(this.possibilities)) - { - writer.WriteAttributeString("set", this.possibilities); - } - - if (!String.IsNullOrEmpty(this.description)) - { - writer.WriteAttributeString("description", this.description); - } - - if (this.escapeIdtCharacters) - { - writer.WriteAttributeString("escapeIdtCharacters", "yes"); - } - - if (this.useCData) - { - writer.WriteAttributeString("useCData", "yes"); - } - - writer.WriteEndElement(); - } - - /// - /// Validate a value for this column. - /// - /// The value to validate. - /// Validated value. - internal object ValidateValue(object value) - { - if (null == value) - { - if (!this.nullable) - { - throw new InvalidOperationException(String.Format(CultureInfo.InvariantCulture, "Cannot set column '{0}' with a null value because this is a required field.", this.name)); - } - } - else // check numerical values against their specified minimum and maximum values. - { - if (ColumnType.Number == this.type && !this.IsLocalizable) - { - // For now all enums in the tables can be represented by integers. This if statement would need to - // be enhanced if that ever changes. - if (value is int || value.GetType().IsEnum) - { - int intValue = (int)value; - - // validate the value against the minimum allowed value - if (this.minValueSet && this.minValue > intValue) - { - throw new InvalidOperationException(String.Format(CultureInfo.InvariantCulture, "Cannot set column '{0}' with value {1} because it is less than the minimum allowed value for this column, {2}.", this.name, intValue, this.minValue)); - } - - // validate the value against the maximum allowed value - if (this.maxValueSet && this.maxValue < intValue) - { - throw new InvalidOperationException(String.Format(CultureInfo.InvariantCulture, "Cannot set column '{0}' with value {1} because it is greater than the maximum allowed value for this column, {2}.", this.name, intValue, this.maxValue)); - } - - return intValue; - } - else if (value is long) - { - long longValue = (long)value; - - // validate the value against the minimum allowed value - if (this.minValueSet && this.minValue > longValue) - { - throw new InvalidOperationException(String.Format(CultureInfo.InvariantCulture, "Cannot set column '{0}' with value {1} because it is less than the minimum allowed value for this column, {2}.", this.name, longValue, this.minValue)); - } - - // validate the value against the maximum allowed value - if (this.maxValueSet && this.maxValue < longValue) - { - throw new InvalidOperationException(String.Format(CultureInfo.InvariantCulture, "Cannot set column '{0}' with value {1} because it is greater than the maximum allowed value for this column, {2}.", this.name, longValue, this.maxValue)); - } - - return longValue; - } - else - { - throw new InvalidOperationException(String.Format(CultureInfo.InvariantCulture, "Cannot set number column '{0}' with a value of type '{1}'.", this.name, value.GetType().ToString())); - } - } - else - { - if (!(value is string)) - { - throw new InvalidOperationException(String.Format(CultureInfo.InvariantCulture, "Cannot set string column '{0}' with a value of type '{1}'.", this.name, value.GetType().ToString())); - } - } - } - - return value; - } - - /// - /// Compare this column definition to another column definition. - /// - /// - /// Only Windows Installer traits are compared, allowing for updates to WiX-specific table definitions. - /// - /// The to compare with this one. - /// 0 if the columns' core propeties are the same; otherwise, non-0. - public int CompareTo(ColumnDefinition other) - { - // by definition, this object is greater than null - if (null == other) - { - return 1; - } - - // compare column names - int ret = String.Compare(this.Name, other.Name, StringComparison.Ordinal); - - // compare column types - if (0 == ret) - { - ret = this.Type == other.Type ? 0 : -1; - - // compare column lengths - if (0 == ret) - { - ret = this.Length == other.Length ? 0 : -1; - - // compare whether both are primary keys - if (0 == ret) - { - ret = this.PrimaryKey == other.PrimaryKey ? 0 : -1; - - // compare nullability - if (0 == ret) - { - ret = this.Nullable == other.Nullable ? 0 : -1; - } - } - } - } - - return ret; - } - } -} diff --git a/src/WixToolset.Data/Common.cs b/src/WixToolset.Data/Common.cs index 8d6ef7b4..f75ad33e 100644 --- a/src/WixToolset.Data/Common.cs +++ b/src/WixToolset.Data/Common.cs @@ -11,14 +11,12 @@ namespace WixToolset.Data internal static class Common { - public const int IntegerNotSet = int.MinValue; + public const int IntegerNotSet = Int32.MinValue; internal static readonly XNamespace W3SchemaPrefix = "http://www.w3.org/"; internal static readonly string[] ReservedFileNames = { "CON", "PRN", "AUX", "NUL", "COM1", "COM2", "COM3", "COM4", "COM5", "COM6", "COM7", "COM8", "COM9", "LPT1", "LPT2", "LPT3", "LPT4", "LPT5", "LPT6", "LPT7", "LPT8", "LPT9" }; - private static readonly Regex LegalIdentifierCharacters = new Regex(@"^[_A-Za-z][0-9A-Za-z_\.]*$", RegexOptions.Compiled); - internal static string GetFileHash(FileInfo fileInfo) { byte[] hashBytes; @@ -38,18 +36,5 @@ namespace WixToolset.Data return sb.ToString(); } - - public static bool IsIdentifier(string value) - { - if (!String.IsNullOrEmpty(value)) - { - if (LegalIdentifierCharacters.IsMatch(value)) - { - return true; - } - } - - return false; - } } } diff --git a/src/WixToolset.Data/CompressionLevel.cs b/src/WixToolset.Data/CompressionLevel.cs index 13242051..c98eb9e1 100644 --- a/src/WixToolset.Data/CompressionLevel.cs +++ b/src/WixToolset.Data/CompressionLevel.cs @@ -1,8 +1,7 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. +// Copyright (c) .NET 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.Data { - /// /// Compression level to use when creating cabinet. /// @@ -23,4 +22,4 @@ namespace WixToolset.Data /// Use ms-zip compression. Mszip } -} +} \ No newline at end of file diff --git a/src/WixToolset.Data/Data/actions.xml b/src/WixToolset.Data/Data/actions.xml deleted file mode 100644 index f65b792d..00000000 --- a/src/WixToolset.Data/Data/actions.xml +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/WixToolset.Data/Data/tables.xml b/src/WixToolset.Data/Data/tables.xml deleted file mode 100644 index 280d87a8..00000000 --- a/src/WixToolset.Data/Data/tables.xml +++ /dev/null @@ -1,1962 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/WixToolset.Data/DuplicateSymbolsException.cs b/src/WixToolset.Data/DuplicateSymbolsException.cs index d0f8536c..6f14d049 100644 --- a/src/WixToolset.Data/DuplicateSymbolsException.cs +++ b/src/WixToolset.Data/DuplicateSymbolsException.cs @@ -5,6 +5,7 @@ namespace WixToolset.Data using System; using System.Collections; +#if false /// /// Duplicate symbols exception. /// @@ -32,4 +33,5 @@ namespace WixToolset.Data return this.duplicateSymbols; } } +#endif } diff --git a/src/WixToolset.Data/Field.cs b/src/WixToolset.Data/Field.cs deleted file mode 100644 index 74b78229..00000000 --- a/src/WixToolset.Data/Field.cs +++ /dev/null @@ -1,266 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Data -{ - using System; - using System.Diagnostics; - using System.Globalization; - using System.Xml; - - /// - /// Field containing data for a column in a row. - /// - public class Field - { - private object data; - - /// - /// Instantiates a new Field. - /// - /// Column definition for this field. - protected Field(ColumnDefinition columnDefinition) - { - this.Column = columnDefinition; - } - - /// - /// Gets or sets the column definition for this field. - /// - /// Column definition. - public ColumnDefinition Column { get; private set; } - - /// - /// Gets or sets the data for this field. - /// - /// Data in the field. - public object Data - { - get - { - return this.data; - } - - set - { - // Validate the value before setting it. - this.data = this.Column.ValidateValue(value); - } - } - - /// - /// Gets or sets whether this field is modified. - /// - /// Whether this field is modified. - public bool Modified { get; set; } - - /// - /// Gets or sets the previous data. - /// - /// The previous data. - public string PreviousData { get; set; } - - /// - /// Instantiate a new Field object of the correct type. - /// - /// The column definition for the field. - /// The new Field object. - public static Field Create(ColumnDefinition columnDefinition) - { - return (ColumnType.Object == columnDefinition.Type) ? new ObjectField(columnDefinition) : new Field(columnDefinition); - } - - /// - /// Sets the value of a particular field in the row without validating. - /// - /// field index. - /// Value of a field in the row. - /// True if successful, false if validation failed. - public bool BestEffortSet(object value) - { - bool success = true; - object bestEffortValue = value; - - try - { - bestEffortValue = this.Column.ValidateValue(value); - } - catch (InvalidOperationException) - { - success = false; - } - - this.data = bestEffortValue; - return success; - } - - /// - /// Determine if this field is identical to another field. - /// - /// The other field to compare to. - /// true if they are equal; false otherwise. - public bool IsIdentical(Field field) - { - return (this.Column.Name == field.Column.Name && - ((null != this.data && this.data.Equals(field.data)) || (null == this.data && null == field.data))); - } - - /// - /// Overrides the built in object implementation to return the field's data as a string. - /// - /// Field's data as a string. - public override string ToString() - { - return this.AsString(); - } - - /// - /// Gets the field as an integer. - /// - /// Field's data as an integer. - public int AsInteger() - { - return (this.data is int) ? (int)this.data : Convert.ToInt32(this.data, CultureInfo.InvariantCulture); - } - - /// - /// Gets the field as an integer that could be null. - /// - /// Field's data as an integer that could be null. - public int? AsNullableInteger() - { - return (null == this.data) ? (int?)null : (this.data is int) ? (int)this.data : Convert.ToInt32(this.data, CultureInfo.InvariantCulture); - } - - /// - /// Gets the field as a string. - /// - /// Field's data as a string. - public string AsString() - { - return (null == this.data) ? null : Convert.ToString(this.data, CultureInfo.InvariantCulture); - } - - /// - /// Parse a field from the xml. - /// - /// XmlReader where the intermediate is persisted. - internal virtual void Read(XmlReader reader) - { - Debug.Assert("field" == reader.LocalName); - - bool empty = reader.IsEmptyElement; - - while (reader.MoveToNextAttribute()) - { - switch (reader.LocalName) - { - case "modified": - this.Modified = reader.Value.Equals("yes"); - break; - case "previousData": - this.PreviousData = reader.Value; - break; - } - } - - if (!empty) - { - bool done = false; - - while (!done && reader.Read()) - { - switch (reader.NodeType) - { - case XmlNodeType.Element: - throw new XmlException(); - case XmlNodeType.CDATA: - case XmlNodeType.Text: - case XmlNodeType.SignificantWhitespace: - if (0 < reader.Value.Length) - { - if (ColumnType.Number == this.Column.Type && !this.Column.IsLocalizable) - { - // older wix files could persist data as a long value (which would overflow an int) - // since the Convert class always throws exceptions for overflows, read in integral - // values as a long to avoid the overflow, then cast it to an int (this operation can - // overflow without throwing an exception inside an unchecked block) - this.data = unchecked((int)Convert.ToInt64(reader.Value, CultureInfo.InvariantCulture)); - } - else - { - this.data = reader.Value; - } - } - break; - case XmlNodeType.EndElement: - done = true; - break; - } - } - - if (!done) - { - throw new XmlException(); - } - } - } - - /// - /// Persists a field in an XML format. - /// - /// XmlWriter where the Field should persist itself as XML. - internal virtual void Write(XmlWriter writer) - { - writer.WriteStartElement("field", Intermediate.XmlNamespaceUri); - - if (this.Modified) - { - writer.WriteAttributeString("modified", "yes"); - } - - if (null != this.PreviousData) - { - writer.WriteAttributeString("previousData", this.PreviousData); - } - - // Convert the data to a string that will persist nicely (nulls as String.Empty). - string text = Convert.ToString(this.data, CultureInfo.InvariantCulture); - if (this.Column.UseCData) - { - writer.WriteCData(text); - } - else - { - writer.WriteString(text); - } - - writer.WriteEndElement(); - } - - /// - /// Returns the field data in a format usable in IDT files. - /// - /// Field data in string IDT format. - internal string ToIdtValue() - { - if (null == this.data) - { - return null; - } - else - { - string fieldData = Convert.ToString(this.data, CultureInfo.InvariantCulture); - - // special idt-specific escaping - if (this.Column.EscapeIdtCharacters) - { - fieldData = fieldData.Replace('\t', '\x10'); - fieldData = fieldData.Replace('\r', '\x11'); - fieldData = fieldData.Replace('\n', '\x19'); - } - - return fieldData; - } - } - } -} diff --git a/src/WixToolset.Data/FileFormat.cs b/src/WixToolset.Data/FileFormat.cs index 9bb54fca..75eab3de 100644 --- a/src/WixToolset.Data/FileFormat.cs +++ b/src/WixToolset.Data/FileFormat.cs @@ -13,5 +13,7 @@ namespace WixToolset.Data Wixout, Wixpdb, + + WixIR, } } diff --git a/src/WixToolset.Data/FileStructure.cs b/src/WixToolset.Data/FileStructure.cs index 7265a51d..9ad9405a 100644 --- a/src/WixToolset.Data/FileStructure.cs +++ b/src/WixToolset.Data/FileStructure.cs @@ -7,6 +7,7 @@ namespace WixToolset.Data using System.Diagnostics; using System.IO; using System.Linq; + using System.Text; /// /// Class that understands the standard file structures in the WiX toolset. @@ -20,6 +21,8 @@ namespace WixToolset.Data private static readonly Dictionary SupportedFileFormats = new Dictionary() { + { "wir", FileFormat.WixIR }, + { "wixirf", FileFormat.WixIR }, { "wixobj", FileFormat.Wixobj }, { "wixlib", FileFormat.Wixlib }, { "wixout", FileFormat.Wixout }, @@ -36,7 +39,7 @@ namespace WixToolset.Data /// /// Count of embedded files in the file structure. /// - public int EmbeddedFileCount { get { return this.embeddedFileSizes.Length; } } + public int EmbeddedFileCount => this.embeddedFileSizes.Length; /// /// File format of the file structure. @@ -50,15 +53,15 @@ namespace WixToolset.Data /// File format for the file structure. /// Paths to files to embedd in the file structure. /// Newly created file structure. - public static FileStructure Create(Stream stream, FileFormat fileFormat, List embedFilePaths) + public static FileStructure Create(Stream stream, FileFormat fileFormat, IEnumerable embedFilePaths) { - FileStructure fs = new FileStructure(); - using (NonClosingStreamWrapper wrapper = new NonClosingStreamWrapper(stream)) - using (BinaryWriter writer = new BinaryWriter(wrapper)) + var fs = new FileStructure(); + + using (var writer = new BinaryWriter(stream, Encoding.UTF8, true)) { fs.WriteType(writer, fileFormat); - fs.WriteEmbeddedFiles(writer, embedFilePaths ?? new List()); + fs.WriteEmbeddedFiles(writer, embedFilePaths.ToArray()); // Remember the data stream offset, which is right after the embedded files have been written. fs.dataStreamOffset = stream.Position; @@ -76,13 +79,13 @@ namespace WixToolset.Data /// File structure populated from the stream. public static FileStructure Read(Stream stream) { - FileStructure fs = new FileStructure(); - using (NonClosingStreamWrapper wrapper = new NonClosingStreamWrapper(stream)) - using (BinaryReader reader = new BinaryReader(wrapper)) + var fs = new FileStructure(); + + using (var reader = new BinaryReader(stream, Encoding.UTF8, true)) { fs.FileFormat = FileStructure.ReadFileFormat(reader); - if (FileFormat.Unknown != fs.FileFormat) + if (fs.FileFormat != FileFormat.Unknown) { fs.embeddedFileSizes = FileStructure.ReadEmbeddedFileSizes(reader); @@ -107,8 +110,7 @@ namespace WixToolset.Data /// Best guess at file format. public static FileFormat GuessFileFormatFromExtension(string extension) { - FileFormat format; - return FileStructure.SupportedFileFormats.TryGetValue(extension.TrimStart('.').ToLowerInvariant(), out format) ? format : FileFormat.Unknown; + return FileStructure.SupportedFileFormats.TryGetValue(extension.TrimStart('.').ToLowerInvariant(), out var format) ? format : FileFormat.Unknown; } /// @@ -124,8 +126,7 @@ namespace WixToolset.Data try { - using (NonClosingStreamWrapper wrapper = new NonClosingStreamWrapper(stream)) - using (BinaryReader reader = new BinaryReader(wrapper)) + using (var reader = new BinaryReader(stream, Encoding.UTF8, true)) { format = FileStructure.ReadFileFormat(reader); } @@ -182,7 +183,21 @@ namespace WixToolset.Data } /// - /// Disposes of the internsl state of the file structure. + /// Gets the data of the file as a string. + /// + /// String contents data of the file. + public string GetData() + { + var bytes = new byte[this.stream.Length - this.dataStreamOffset]; + + this.stream.Seek(this.dataStreamOffset, SeekOrigin.Begin); + this.stream.Read(bytes, 0, bytes.Length); + + return Encoding.UTF8.GetString(bytes); + } + + /// + /// Disposes of the internal state of the file structure. /// public void Dispose() { @@ -217,7 +232,13 @@ namespace WixToolset.Data { FileFormat format = FileFormat.Unknown; - string type = new string(reader.ReadChars(6)); + string type = new string(reader.ReadChars(3)); + if (FileStructure.SupportedFileFormats.TryGetValue(type, out format)) + { + return format; + } + + type += new string(reader.ReadChars(3)); FileStructure.SupportedFileFormats.TryGetValue(type, out format); return format; @@ -256,21 +277,21 @@ namespace WixToolset.Data this.FileFormat = fileFormat; - Debug.Assert(6 == type.ToCharArray().Length); + Debug.Assert(3 == type.ToCharArray().Length || 6 == type.ToCharArray().Length); writer.Write(type.ToCharArray()); return writer; } - private BinaryWriter WriteEmbeddedFiles(BinaryWriter writer, List embedFilePaths) + private BinaryWriter WriteEmbeddedFiles(BinaryWriter writer, string[] embedFilePaths) { // First write the count of embedded files as a Uint32; - writer.Write((uint)embedFilePaths.Count); + writer.Write((uint)embedFilePaths.Length); - this.embeddedFileSizes = new long[embedFilePaths.Count]; + this.embeddedFileSizes = new long[embedFilePaths.Length]; // Next write out the size of each file as a Uint64 in order. - FileInfo[] files = new FileInfo[embedFilePaths.Count]; - for (int i = 0; i < embedFilePaths.Count; ++i) + FileInfo[] files = new FileInfo[embedFilePaths.Length]; + for (int i = 0; i < embedFilePaths.Length; ++i) { files[i] = new FileInfo(embedFilePaths[i]); diff --git a/src/WixToolset.Data/ITupleDefinitionCreator.cs b/src/WixToolset.Data/ITupleDefinitionCreator.cs new file mode 100644 index 00000000..63477314 --- /dev/null +++ b/src/WixToolset.Data/ITupleDefinitionCreator.cs @@ -0,0 +1,9 @@ +// Copyright (c) .NET 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.Data +{ + public interface ITupleDefinitionCreator + { + bool TryGetTupleDefinitionByName(string name, out IntermediateTupleDefinition tupleDefinition); + } +} diff --git a/src/WixToolset.Data/Identifier.cs b/src/WixToolset.Data/Identifier.cs index 96acc997..38b12989 100644 --- a/src/WixToolset.Data/Identifier.cs +++ b/src/WixToolset.Data/Identifier.cs @@ -2,9 +2,13 @@ namespace WixToolset.Data { + using System; + using System.Diagnostics; + /// /// Class to define the identifier and access for a row. /// + [DebuggerDisplay("{Access} {Id,nq}")] public class Identifier { public static Identifier Invalid = new Identifier(null, AccessModifier.Private); @@ -15,6 +19,12 @@ namespace WixToolset.Data this.Access = access; } + public Identifier(int id, AccessModifier access) + { + this.Id = id.ToString(); + this.Access = access; + } + /// /// Access modifier for a row. /// diff --git a/src/WixToolset.Data/Intermediate.cs b/src/WixToolset.Data/Intermediate.cs index fd14f11b..b03492ce 100644 --- a/src/WixToolset.Data/Intermediate.cs +++ b/src/WixToolset.Data/Intermediate.cs @@ -5,7 +5,7 @@ namespace WixToolset.Data using System; using System.Collections.Generic; using System.IO; - using System.Xml; + using SimpleJson; /// /// Container class for an intermediate object. @@ -15,34 +15,192 @@ namespace WixToolset.Data public const string XmlNamespaceUri = "http://wixtoolset.org/schemas/v4/wixobj"; private static readonly Version CurrentVersion = new Version("4.0.0.0"); - private string id; - private List
sections; + private Dictionary localizationsByCulture; /// /// Instantiate a new Intermediate. /// public Intermediate() { - this.id = Convert.ToBase64String(Guid.NewGuid().ToByteArray()).TrimEnd('=').Replace('+', '.').Replace('/', '_'); - this.sections = new List
(); + this.Id = Convert.ToBase64String(Guid.NewGuid().ToByteArray()).TrimEnd('=').Replace('+', '.').Replace('/', '_'); + this.EmbedFilePaths = new List(); + this.localizationsByCulture = new Dictionary(StringComparer.OrdinalIgnoreCase); + this.Sections = new List(); } + public Intermediate(string id, IEnumerable sections, IDictionary localizationsByCulture, IEnumerable embedFilePaths) + { + this.Id = id; + this.EmbedFilePaths = (embedFilePaths != null) ? new List(embedFilePaths) : new List(); + this.localizationsByCulture = (localizationsByCulture != null) ? new Dictionary(localizationsByCulture, StringComparer.OrdinalIgnoreCase) : new Dictionary(StringComparer.OrdinalIgnoreCase); + this.Sections = (sections != null) ? new List(sections) : new List(); + } + + /// + /// Get the id for the intermediate. + /// + public string Id { get; } + + /// + /// Get the embed file paths in this intermediate. + /// + public IList EmbedFilePaths { get; } + + /// + /// Get the localizations contained in this intermediate. + /// + public IEnumerable Localizations => this.localizationsByCulture.Values; + /// /// Get the sections contained in this intermediate. /// - /// Sections contained in this intermediate. - public IEnumerable
Sections { get { return this.sections; } } + public IList Sections { get; } /// - /// Adds a section to the intermediate. + /// Adds a localization to the intermediate. /// - /// Section to add to the intermediate. - public void AddSection(Section section) + /// Localization to add to the intermediate. + public void AddLocalization(Localization localization) + { + if (this.localizationsByCulture.TryGetValue(localization.Culture, out var existingCulture)) + { + existingCulture.Merge(localization); + } + else + { + this.localizationsByCulture.Add(localization.Culture, localization); + } + } + + /// + /// Gets localization files from this library that match the cultures passed in, in the order of the array of cultures. + /// + /// The list of cultures to get localizations for. + /// All localizations contained in this library that match the set of cultures provided, in the same order. + public IEnumerable GetLocalizationsForCultures(IEnumerable cultures) + { + foreach (string culture in cultures ?? Array.Empty()) + { + if (this.localizationsByCulture.TryGetValue(culture, out var localization)) + { + yield return localization; + } + } + } + + /// + /// Loads an intermediate from a path on disk. + /// + /// Path to intermediate file saved on disk. + /// Suppress checking for wix.dll version mismatches. + /// Returns the loaded intermediate. + public static Intermediate Load(string path, bool suppressVersionCheck = false) + { + var creator = new SimpleTupleDefinitionCreator(); + return Intermediate.Load(path, creator, suppressVersionCheck); + } + + /// + /// Loads an intermediate from a path on disk. + /// + /// Path to intermediate file saved on disk. + /// ITupleDefinitionCreator to use when reconstituting the intermediate. + /// Suppress checking for wix.dll version mismatches. + /// Returns the loaded intermediate. + public static Intermediate Load(string path, ITupleDefinitionCreator creator, bool suppressVersionCheck = false) { - section.IntermediateId = this.id; - this.sections.Add(section); + JsonObject jsonObject; + + using (FileStream stream = File.OpenRead(path)) + using (FileStructure fs = FileStructure.Read(stream)) + { + if (FileFormat.WixIR != fs.FileFormat) + { + throw new WixUnexpectedFileFormatException(path, FileFormat.WixIR, fs.FileFormat); + } + + var json = fs.GetData(); + jsonObject = SimpleJson.DeserializeObject(json) as JsonObject; + } + + if (!suppressVersionCheck) + { + var versionJson = jsonObject.GetValueOrDefault("version"); + + if (!Version.TryParse(versionJson, out var version) || !Intermediate.CurrentVersion.Equals(version)) + { + throw new WixException(WixDataErrors.VersionMismatch(SourceLineNumber.CreateFromUri(path), "intermediate", versionJson, Intermediate.CurrentVersion.ToString())); + } + } + + var id = jsonObject.GetValueOrDefault("id"); + + var sections = new List(); + + var sectionsJson = jsonObject.GetValueOrDefault("sections"); + foreach (JsonObject sectionJson in sectionsJson) + { + var section = IntermediateSection.Deserialize(creator, sectionJson); + sections.Add(section); + } + + var localizations = new Dictionary(StringComparer.OrdinalIgnoreCase); + + //var localizationsJson = jsonObject.GetValueOrDefault("localizations") ?? new JsonArray(); + //foreach (JsonObject localizationJson in localizationsJson) + //{ + // var localization = Localization.Deserialize(localizationJson); + // localizations.Add(localization.Culture, localization); + //} + + return new Intermediate(id, sections, localizations, null); + } + + /// + /// Saves an intermediate to a path on disk. + /// + /// Path to save intermediate file to disk. + public void Save(string path) + { + Directory.CreateDirectory(Path.GetDirectoryName(Path.GetFullPath(path))); + + using (var stream = File.Create(path)) + using (var fs = FileStructure.Create(stream, FileFormat.WixIR, this.EmbedFilePaths)) + using (var writer = new StreamWriter(fs.GetDataStream())) + { + var jsonObject = new JsonObject + { + { "id", this.Id }, + { "version", Intermediate.CurrentVersion.ToString() } + }; + + var sectionsJson = new JsonArray(this.Sections.Count); + foreach (var section in this.Sections) + { + var sectionJson = section.Serialize(); + sectionsJson.Add(sectionJson); + } + + jsonObject.Add("sections", sectionsJson); + + //if (this.Localizations.Any()) + //{ + // var localizationsJson = new JsonArray(); + // foreach (var localization in this.Localizations) + // { + // var localizationJson = localization.Serialize(); + // localizationsJson.Add(localizationJson); + // } + + // jsonObject.Add("localizations", localizationsJson); + //} + + var json = SimpleJson.SerializeObject(jsonObject); + writer.Write(json); + } } +#if false /// /// Loads an intermediate from a path on disk. /// @@ -84,9 +242,9 @@ namespace WixToolset.Data { Directory.CreateDirectory(Path.GetDirectoryName(Path.GetFullPath(path))); - using (FileStream stream = File.Create(path)) - using (FileStructure fs = FileStructure.Create(stream, FileFormat.Wixobj, null)) - using (XmlWriter writer = XmlWriter.Create(fs.GetDataStream())) + using (var stream = File.Create(path)) + using (var fs = FileStructure.Create(stream, FileFormat.Wixobj, null)) + using (var writer = XmlWriter.Create(fs.GetDataStream())) { writer.WriteStartDocument(); this.Write(writer); @@ -185,5 +343,6 @@ namespace WixToolset.Data writer.WriteEndElement(); } +#endif } } diff --git a/src/WixToolset.Data/IntermediateField.cs b/src/WixToolset.Data/IntermediateField.cs new file mode 100644 index 00000000..eba0e1ab --- /dev/null +++ b/src/WixToolset.Data/IntermediateField.cs @@ -0,0 +1,70 @@ +// Copyright (c) .NET 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.Data +{ + using System.Diagnostics; + using SimpleJson; + + [DebuggerDisplay("Name={Name,nq} Type={Type} Value={Value.AsString()}")] + public class IntermediateField + { + public IntermediateField(IntermediateFieldDefinition definition) + { + this.Definition = definition; + } + + public IntermediateFieldDefinition Definition { get; } + + public string Name => this.Definition.Name; + + public IntermediateFieldType Type => this.Definition.Type; + + public string Context => this.Value?.Context; + + public IntermediateFieldValue PreviousValue => this.Value?.PreviousValue; + + internal IntermediateFieldValue Value { get; set; } + + public static explicit operator bool(IntermediateField field) + { + return field.AsBool(); + } + + public static explicit operator bool? (IntermediateField field) + { + return field.AsNullableBool(); + } + + public static explicit operator int(IntermediateField field) + { + return field.AsNumber(); + } + + public static explicit operator int? (IntermediateField field) + { + return field.AsNullableNumber(); + } + + public static explicit operator string(IntermediateField field) + { + return field.AsString(); + } + + internal static IntermediateField Deserialize(IntermediateFieldDefinition definition, JsonObject jsonObject) + { + var field = new IntermediateField(definition); + + if (jsonObject != null) + { + field.Value = IntermediateFieldValue.Deserialize(jsonObject); + } + + return field; + } + + internal JsonObject Serialize() + { + return this.Value?.Serialize(); + } + } +} diff --git a/src/WixToolset.Data/IntermediateFieldContext.cs b/src/WixToolset.Data/IntermediateFieldContext.cs new file mode 100644 index 00000000..a29a63c4 --- /dev/null +++ b/src/WixToolset.Data/IntermediateFieldContext.cs @@ -0,0 +1,38 @@ +// Copyright (c) .NET 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.Data +{ + using System; + + public class IntermediateFieldContext : IDisposable + { + private string previous; + private bool disposed; + + public IntermediateFieldContext(string context) + { + this.previous = IntermediateFieldExtensions.valueContext; + + IntermediateFieldExtensions.valueContext = context; + } + + public void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + protected virtual void Dispose(bool disposing) + { + if (!this.disposed) + { + if (disposing) + { + IntermediateFieldExtensions.valueContext = this.previous; + } + + this.disposed = true; + } + } + } +} diff --git a/src/WixToolset.Data/IntermediateFieldDefinition.cs b/src/WixToolset.Data/IntermediateFieldDefinition.cs new file mode 100644 index 00000000..c77a2ae8 --- /dev/null +++ b/src/WixToolset.Data/IntermediateFieldDefinition.cs @@ -0,0 +1,25 @@ +// Copyright (c) .NET 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.Data +{ + public enum IntermediateFieldType + { + String, + Bool, + Number, + Path, + } + + public class IntermediateFieldDefinition + { + public IntermediateFieldDefinition(string name, IntermediateFieldType type) + { + this.Name = name; + this.Type = type; + } + + public string Name { get; } + + public IntermediateFieldType Type { get; } + } +} diff --git a/src/WixToolset.Data/IntermediateFieldExtensions.cs b/src/WixToolset.Data/IntermediateFieldExtensions.cs new file mode 100644 index 00000000..c551b455 --- /dev/null +++ b/src/WixToolset.Data/IntermediateFieldExtensions.cs @@ -0,0 +1,206 @@ +// Copyright (c) .NET 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.Data +{ + using System; + + public static class IntermediateFieldExtensions + { + [ThreadStatic] + internal static string valueContext; + + public static IntermediateField Set(this IntermediateField field, object value) + { + if (field == null) + { + throw new ArgumentNullException(nameof(field)); + } + else if (value == null) + { + // Null is always allowed. + } + else if (field.Type == IntermediateFieldType.Bool && !(value is bool)) + { + throw new ArgumentException(nameof(value)); + } + else if (field.Type == IntermediateFieldType.Number && !(value is int)) + { + throw new ArgumentException(nameof(value)); + } + else if (field.Type == IntermediateFieldType.String && !(value is string)) + { + throw new ArgumentException(nameof(value)); + } + else if (field.Type == IntermediateFieldType.Path && !(value is IntermediateFieldPathValue || value is string)) + { + throw new ArgumentException(nameof(value)); + } + + if (field.Type == IntermediateFieldType.Path && value != null && value is string) + { + value = new IntermediateFieldPathValue { Path = (string)value }; + } + + field.Value = new IntermediateFieldValue + { + Context = valueContext, + Data = value, + PreviousValue = field.Value + }; + + return field; + } + + public static IntermediateField Set(this IntermediateField field, IntermediateFieldDefinition definition, object value) + { + if (field == null) + { + field = new IntermediateField(definition); + } + + return field.Set(value); + } + + public static bool AsBool(this IntermediateField field) + { + if (field == null || field.Value == null || field.Value.Data == null) + { + return false; + } + + switch (field.Definition.Type) + { + case IntermediateFieldType.Bool: + return field.Value.AsBool(); + + case IntermediateFieldType.Number: + return field.Value.AsNumber() != 0; + + case IntermediateFieldType.String: + return !String.IsNullOrEmpty(field.Value.AsString()); + + case IntermediateFieldType.Path: + return !String.IsNullOrEmpty(field.Value.AsPath()?.Path); + + default: + throw new InvalidCastException($"Cannot convert field {field.Name} with type {field.Type} to boolean"); + } + } + + public static bool? AsNullableBool(this IntermediateField field) + { + if (field == null || field.Value == null || field.Value.Data == null) + { + return null; + } + + switch (field.Definition.Type) + { + case IntermediateFieldType.Bool: + return field.Value.AsBool(); + + case IntermediateFieldType.Number: + return field.Value.AsNumber() != 0; + + case IntermediateFieldType.String: + return !System.String.IsNullOrEmpty(field.Value.AsString()); + + default: + throw new InvalidCastException($"Cannot convert field {field.Name} with type {field.Type} to boolean"); + } + } + + + public static int AsNumber(this IntermediateField field) + { + if (field == null || field.Value == null || field.Value.Data == null) + { + return 0; + } + + switch (field.Definition.Type) + { + case IntermediateFieldType.Bool: + return field.Value.AsBool() ? 1 : 0; + + case IntermediateFieldType.Number: + return field.Value.AsNumber(); + + case IntermediateFieldType.String: + return Convert.ToInt32(field.Value.AsString()); + + default: + throw new InvalidCastException($"Cannot convert field {field.Name} with type {field.Type} to number"); + } + } + + public static int? AsNullableNumber(this IntermediateField field) + { + if (field == null || field.Value == null || field.Value.Data == null) + { + return null; + } + + switch (field.Definition.Type) + { + case IntermediateFieldType.Bool: + return field.Value.AsBool() ? 1 : 0; + + case IntermediateFieldType.Number: + return field.Value.AsNumber(); + + case IntermediateFieldType.String: + return Convert.ToInt32(field.Value.AsString()); + + default: + throw new InvalidCastException($"Cannot convert field {field.Name} with type {field.Type} to number"); + } + } + + public static IntermediateFieldPathValue AsPath(this IntermediateField field) + { + if (field == null || field.Value == null || field.Value.Data == null) + { + return null; + } + + switch (field.Definition.Type) + { + case IntermediateFieldType.String: + return new IntermediateFieldPathValue { Path = field.Value.AsString() }; + + case IntermediateFieldType.Path: + return field.Value.AsPath(); + + default: + throw new InvalidCastException($"Cannot convert field {field.Name} with type {field.Type} to string"); + } + } + + public static string AsString(this IntermediateField field) + { + if (field == null || field.Value == null || field.Value.Data == null) + { + return null; + } + + switch (field.Definition.Type) + { + case IntermediateFieldType.Bool: + return field.Value.AsBool() ? "true" : "false"; + + case IntermediateFieldType.Number: + return field.Value.AsNumber().ToString(); + + case IntermediateFieldType.String: + return field.Value.AsString(); + + case IntermediateFieldType.Path: + return field.Value.AsPath()?.Path; + + default: + throw new InvalidCastException($"Cannot convert field {field.Name} with type {field.Type} to string"); + } + } + } +} diff --git a/src/WixToolset.Data/IntermediateFieldPathValue.cs b/src/WixToolset.Data/IntermediateFieldPathValue.cs new file mode 100644 index 00000000..7d4fcdfe --- /dev/null +++ b/src/WixToolset.Data/IntermediateFieldPathValue.cs @@ -0,0 +1,27 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data +{ + using System; + + public class IntermediateFieldPathValue + { + /// + /// Gets or sets the index of the embedded file in a library. + /// + /// The index of the embedded file. + public int? EmbeddedFileIndex { get; set; } + + /// + /// Gets the base URI of the path field. + /// + /// The base URI of the path field. + public Uri BaseUri { get; set; } + + /// + /// Gets or sets the data for this field. + /// + /// Data in the field. + public string Path { get; set; } + } +} diff --git a/src/WixToolset.Data/IntermediateFieldValue.cs b/src/WixToolset.Data/IntermediateFieldValue.cs new file mode 100644 index 00000000..2064afec --- /dev/null +++ b/src/WixToolset.Data/IntermediateFieldValue.cs @@ -0,0 +1,131 @@ +// Copyright (c) .NET 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.Data +{ + using System; + using System.Diagnostics; + using SimpleJson; + + [DebuggerDisplay("{Data}")] + public class IntermediateFieldValue + { + public string Context { get; internal set; } + + internal object Data { get; set; } + + public IntermediateFieldValue PreviousValue { get; internal set; } + + public static explicit operator bool(IntermediateFieldValue value) + { + return value.AsBool(); + } + + public static explicit operator bool? (IntermediateFieldValue value) + { + return value.AsNullableBool(); + } + + public static explicit operator int(IntermediateFieldValue value) + { + return value.AsNumber(); + } + + public static explicit operator int? (IntermediateFieldValue value) + { + return value.AsNullableNumber(); + } + + public static explicit operator IntermediateFieldPathValue(IntermediateFieldValue value) + { + return value.AsPath(); + } + + public static explicit operator string(IntermediateFieldValue value) + { + return value.AsString(); + } + + internal static IntermediateFieldValue Deserialize(JsonObject jsonObject) + { + var context = jsonObject.GetValueOrDefault("context"); + if (!jsonObject.TryGetValue("data", out var data)) + { + throw new ArgumentException(); + } + + var value = data; + + if (data is JsonObject jsonData) + { + Uri baseUri = null; + + if (jsonData.TryGetValue("baseUri", out var baseUriValue) && baseUriValue is string) + { + baseUri = new Uri((string)baseUriValue); + } + jsonData.TryGetValue("embeddedIndex", out var embeddedIndex); + + value = new IntermediateFieldPathValue + { + BaseUri = baseUri, + EmbeddedFileIndex = (int?)embeddedIndex, + Path = jsonData.GetValueOrDefault("path"), + }; + } + + var previousValueJson = jsonObject.GetValueOrDefault("prev"); + var previousValue = (previousValueJson == null) ? null : IntermediateFieldValue.Deserialize(previousValueJson); + + return new IntermediateFieldValue + { + Context = context, + Data = value, + PreviousValue = previousValue + }; + } + + internal JsonObject Serialize() + { + var jsonObject = new JsonObject(); + + if (!String.IsNullOrEmpty(this.Context)) + { + jsonObject.Add("context", this.Context); + } + + if (this.Data is IntermediateFieldPathValue pathField) + { + var jsonData = new JsonObject(); + + if (pathField.BaseUri != null) + { + jsonData.Add("baseUri", pathField.BaseUri.AbsoluteUri); + } + + if (pathField.EmbeddedFileIndex.HasValue) + { + jsonData.Add("embeddedIndex", pathField.EmbeddedFileIndex.Value); + } + + if (!String.IsNullOrEmpty(pathField.Path)) + { + jsonData.Add("path", pathField.Path); + } + + jsonObject.Add("data", jsonData); + } + else + { + jsonObject.Add("data", this.Data); + } + + if (this.PreviousValue != null) + { + var previousValueJson = this.PreviousValue.Serialize(); + jsonObject.Add("prev", previousValueJson); + } + + return jsonObject; + } + } +} diff --git a/src/WixToolset.Data/IntermediateFieldValueExtensions.cs b/src/WixToolset.Data/IntermediateFieldValueExtensions.cs new file mode 100644 index 00000000..bc106d4b --- /dev/null +++ b/src/WixToolset.Data/IntermediateFieldValueExtensions.cs @@ -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. + +namespace WixToolset.Data +{ + public static class IntermediateFieldValueExtensions + { + public static bool AsBool(this IntermediateFieldValue value) + { + return value?.Data == null ? false : (bool)value.Data; + } + + public static bool? AsNullableBool(this IntermediateFieldValue value) + { + return (bool?)value?.Data; + } + + public static int AsNumber(this IntermediateFieldValue value) + { + return value?.Data == null ? 0 : (int)value.Data; + } + + public static int? AsNullableNumber(this IntermediateFieldValue value) + { + return (int?)value?.Data; + } + + public static IntermediateFieldPathValue AsPath(this IntermediateFieldValue value) + { + return (IntermediateFieldPathValue)value?.Data; + } + + public static string AsString(this IntermediateFieldValue value) + { + return (string)value?.Data; + } + } +} diff --git a/src/WixToolset.Data/IntermediateSection.cs b/src/WixToolset.Data/IntermediateSection.cs new file mode 100644 index 00000000..2b1f7375 --- /dev/null +++ b/src/WixToolset.Data/IntermediateSection.cs @@ -0,0 +1,118 @@ +// Copyright (c) .NET 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.Data +{ + using System; + using System.Collections.Generic; + using SimpleJson; + + /// + /// Section in an intermediate file. + /// + public class IntermediateSection + { + /// + /// Creates a new section as part of an intermediate. + /// + /// Identifier for section. + /// Type of section. + /// Codepage for resulting database. + public IntermediateSection(string id, SectionType type, int codepage) + { + this.Id = id; + this.Type = type; + this.Codepage = codepage; + this.Tuples = new List(); + } + + /// + /// Gets the identifier for the section. + /// + /// Section identifier. + public string Id { get; } + + /// + /// Gets the type of the section. + /// + /// Type of section. + public SectionType Type { get; } + + /// + /// Gets the codepage for the section. + /// + /// Codepage for the section. + public int Codepage { get; set; } + + /// + /// Gets and sets the identifier of the compilation of the source file containing the section. + /// + public string CompilationId { get; set; } + + /// + /// Gets and sets the identifier of the library that combined the section. + /// + public string LibraryId { get; set; } + + /// + /// Tuples in the section. + /// + public IList Tuples { get; } + + /// + /// Parse a section from the JSON data. + /// + internal static IntermediateSection Deserialize(ITupleDefinitionCreator creator, JsonObject jsonObject) + { + var codepage = jsonObject.GetValueOrDefault("codepage", 0); + var id = jsonObject.GetValueOrDefault("id"); + var type = jsonObject.GetEnumOrDefault("type", SectionType.Unknown); + var tuplesJson = jsonObject.GetValueOrDefault("tuples"); + + if (null == id && (SectionType.Unknown != type && SectionType.Fragment != type)) + { + throw new ArgumentException("JSON object is not a valid section"); + } + + if (SectionType.Unknown == type) + { + throw new ArgumentException("JSON object is not a valid section", nameof(type)); + } + + var section = new IntermediateSection(id, type, codepage); + + foreach (JsonObject tupleJson in tuplesJson) + { + var tuple = IntermediateTuple.Deserialize(creator, tupleJson); + section.Tuples.Add(tuple); + } + + return section; + } + + internal JsonObject Serialize() + { + var jsonObject = new JsonObject + { + { "type", this.Type.ToString().ToLowerInvariant() }, + { "codepage", this.Codepage } + }; + + if (!String.IsNullOrEmpty(this.Id)) + { + jsonObject.Add("id", this.Id); + } + + var tuplesJson = new JsonArray(this.Tuples.Count); + + foreach (var tuple in this.Tuples) + { + var tupleJson = tuple.Serialize(); + tuplesJson.Add(tupleJson); + } + + jsonObject.Add("tuples", tuplesJson); + + return jsonObject; + } + } +} diff --git a/src/WixToolset.Data/IntermediateTuple.cs b/src/WixToolset.Data/IntermediateTuple.cs new file mode 100644 index 00000000..36cee2aa --- /dev/null +++ b/src/WixToolset.Data/IntermediateTuple.cs @@ -0,0 +1,70 @@ +// Copyright (c) .NET 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.Data +{ + using SimpleJson; + + public class IntermediateTuple + { + //public IntermediateTuple(IntermediateTupleDefinition definition) : this(definition, null, null) + //{ + //} + + public IntermediateTuple(IntermediateTupleDefinition definition, SourceLineNumber sourceLineNumber, Identifier id = null) + { + this.Definition = definition; + this.Fields = new IntermediateField[definition.FieldDefinitions.Length]; + this.SourceLineNumbers = sourceLineNumber; + this.Id = id; + } + + public IntermediateTupleDefinition Definition { get; } + + public IntermediateField[] Fields { get; } + + public SourceLineNumber SourceLineNumbers { get; set; } + + public Identifier Id { get; set; } + + public IntermediateField this[int index] => this.Fields[index]; + + internal static IntermediateTuple Deserialize(ITupleDefinitionCreator creator, JsonObject jsonObject) + { + var definitionName = jsonObject.GetValueOrDefault("def"); + var fieldsJson = jsonObject.GetValueOrDefault("fields"); + + creator.TryGetTupleDefinitionByName(definitionName, out var definition); // TODO: this isn't sufficient. + var tuple = definition.CreateTuple(); + + for (var i = 0; i < fieldsJson.Count; ++i) + { + if (tuple.Fields.Length > i && fieldsJson[i] is JsonObject fieldJson) + { + tuple.Fields[i] = IntermediateField.Deserialize(tuple.Definition.FieldDefinitions[i], fieldJson); + } + } + + return tuple; + } + + internal JsonObject Serialize() + { + var jsonObject = new JsonObject + { + { "def", this.Definition.Name } + }; + + var fieldsJson = new JsonArray(this.Fields.Length); + + foreach (var field in this.Fields) + { + var fieldJson = field?.Serialize(); + fieldsJson.Add(fieldJson); + } + + jsonObject.Add("fields", fieldsJson); + + return jsonObject; + } + } +} diff --git a/src/WixToolset.Data/IntermediateTupleDefinition.cs b/src/WixToolset.Data/IntermediateTupleDefinition.cs new file mode 100644 index 00000000..5658cfe9 --- /dev/null +++ b/src/WixToolset.Data/IntermediateTupleDefinition.cs @@ -0,0 +1,47 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data +{ + using System; + + public class IntermediateTupleDefinition + { + public IntermediateTupleDefinition(string name, IntermediateFieldDefinition[] fieldDefinitions, Type strongTupleType) + : this(TupleDefinitionType.MustBeFromAnExtension, name, fieldDefinitions, strongTupleType) + { + } + + internal IntermediateTupleDefinition(TupleDefinitionType type, IntermediateFieldDefinition[] fieldDefinitions, Type strongTupleType) + : this(type, type.ToString(), fieldDefinitions, strongTupleType) + { + } + + private IntermediateTupleDefinition(TupleDefinitionType type, string name, IntermediateFieldDefinition[] fieldDefinitions, Type strongTupleType) + { + this.Type = type; + this.Name = name; + this.FieldDefinitions = fieldDefinitions; + this.StrongTupleType = strongTupleType ?? typeof(IntermediateTuple); +#if DEBUG + if (!this.StrongTupleType.IsSubclassOf(typeof(IntermediateTuple))) throw new ArgumentException(nameof(strongTupleType)); +#endif + } + + public TupleDefinitionType Type { get; } + + public string Name { get; } + + public IntermediateFieldDefinition[] FieldDefinitions { get; } + + private Type StrongTupleType { get; } + + public IntermediateTuple CreateTuple(SourceLineNumber sourceLineNumber = null, Identifier id = null) + { + var result = (this.StrongTupleType == typeof(IntermediateTuple)) ? (IntermediateTuple)Activator.CreateInstance(this.StrongTupleType, this) : (IntermediateTuple)Activator.CreateInstance(this.StrongTupleType); + result.SourceLineNumbers = sourceLineNumber; + result.Id = id; + + return result; + } + } +} diff --git a/src/WixToolset.Data/IntermediateTupleExtensions.cs b/src/WixToolset.Data/IntermediateTupleExtensions.cs new file mode 100644 index 00000000..9865c06a --- /dev/null +++ b/src/WixToolset.Data/IntermediateTupleExtensions.cs @@ -0,0 +1,41 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data +{ + public static class IntermediateTupleExtensions + { + public static IntermediateField Set(this IntermediateTuple tuple, int index, object value) + { + var definition = tuple.Definition.FieldDefinitions[index]; + + var field = tuple.Fields[index].Set(definition, value); ; + + return tuple.Fields[index] = field; + } + + public static bool AsBool(this IntermediateTuple tuple, int index) + { + return tuple?.Fields[index].AsBool() ?? false; + } + + public static bool? AsNullableBool(this IntermediateTuple tuple, int index) + { + return tuple?.Fields[index].AsNullableBool(); + } + + public static int AsNumber(this IntermediateTuple tuple, int index) + { + return tuple?.Fields[index].AsNumber() ?? 0; + } + + public static int? AsNullableNumber(this IntermediateTuple tuple, int index) + { + return tuple?.Fields[index].AsNullableNumber(); + } + + public static string AsString(this IntermediateTuple tuple, int index) + { + return tuple?.Fields[index].AsString(); + } + } +} diff --git a/src/WixToolset.Data/Json/JsonObjectExtensions.cs b/src/WixToolset.Data/Json/JsonObjectExtensions.cs new file mode 100644 index 00000000..091d90f4 --- /dev/null +++ b/src/WixToolset.Data/Json/JsonObjectExtensions.cs @@ -0,0 +1,29 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data +{ + using System; + using SimpleJson; + + internal static class JsonObjectExtensions + { + public static int GetValueOrDefault(this JsonObject jsonObject, string key, int defaultValue) + { + return jsonObject.TryGetValue(key, out var value) ? Convert.ToInt32(value) : defaultValue; + } + + public static T GetValueOrDefault(this JsonObject jsonObject, string key, T defaultValue = default(T)) where T : class + { + return jsonObject.TryGetValue(key, out var value) ? value as T: defaultValue; + } + + public static T GetEnumOrDefault(this JsonObject jsonObject, string key, T defaultValue) where T : struct + { +#if DEBUG + if (!typeof(T).IsEnum) throw new ArgumentException("This method is designed to only only support enums.", nameof(T)); +#endif + var value = jsonObject.GetValueOrDefault(key); + return Enum.TryParse(value, true, out T e) ? e : defaultValue; + } + } +} diff --git a/src/WixToolset.Data/Json/SimpleJson.cs b/src/WixToolset.Data/Json/SimpleJson.cs new file mode 100644 index 00000000..3d956f6e --- /dev/null +++ b/src/WixToolset.Data/Json/SimpleJson.cs @@ -0,0 +1,2127 @@ +//----------------------------------------------------------------------- +// +// Copyright (c) 2011, The Outercurve Foundation. +// +// Licensed under the MIT License (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.opensource.org/licenses/mit-license.php +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Nathan Totten (ntotten.com), Jim Zimmerman (jimzimmerman.com) and Prabir Shrestha (prabir.me) +// https://github.com/facebook-csharp-sdk/simple-json +//----------------------------------------------------------------------- + +// VERSION: + +// NOTE: uncomment the following line to make SimpleJson class internal. +#define SIMPLE_JSON_INTERNAL + +// NOTE: uncomment the following line to make JsonArray and JsonObject class internal. +#define SIMPLE_JSON_OBJARRAYINTERNAL + +// NOTE: uncomment the following line to enable dynamic support. +//#define SIMPLE_JSON_DYNAMIC + +// NOTE: uncomment the following line to enable DataContract support. +//#define SIMPLE_JSON_DATACONTRACT + +// NOTE: uncomment the following line to enable IReadOnlyCollection and IReadOnlyList support. +//#define SIMPLE_JSON_READONLY_COLLECTIONS + +// NOTE: uncomment the following line to disable linq expressions/compiled lambda (better performance) instead of method.invoke(). +// define if you are using .net framework <= 3.0 or < WP7.5 +//#define SIMPLE_JSON_NO_LINQ_EXPRESSION + +// NOTE: uncomment the following line if you are compiling under Window Metro style application/library. +// usually already defined in properties +//#define NETFX_CORE; + +// If you are targetting WinStore, WP8 and NET4.5+ PCL make sure to #define SIMPLE_JSON_TYPEINFO; + +// original json parsing code from http://techblog.procurios.nl/k/618/news/view/14605/14863/How-do-I-write-my-own-parser-for-JSON.html + +#if NETFX_CORE +#define SIMPLE_JSON_TYPEINFO +#endif + +using System; +using System.CodeDom.Compiler; +using System.Collections; +using System.Collections.Generic; +#if !SIMPLE_JSON_NO_LINQ_EXPRESSION +using System.Linq.Expressions; +#endif +using System.ComponentModel; +using System.Diagnostics.CodeAnalysis; +#if SIMPLE_JSON_DYNAMIC +using System.Dynamic; +#endif +using System.Globalization; +using System.Reflection; +using System.Runtime.Serialization; +using System.Text; +using SimpleJson.Reflection; + +// ReSharper disable LoopCanBeConvertedToQuery +// ReSharper disable RedundantExplicitArrayCreation +// ReSharper disable SuggestUseVarKeywordEvident +namespace SimpleJson +{ + /// + /// Represents the json array. + /// + [GeneratedCode("simple-json", "1.0.0")] + [EditorBrowsable(EditorBrowsableState.Never)] + [SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")] +#if SIMPLE_JSON_OBJARRAYINTERNAL + internal +#else + public +#endif + class JsonArray : List + { + /// + /// Initializes a new instance of the class. + /// + public JsonArray() { } + + /// + /// Initializes a new instance of the class. + /// + /// The capacity of the json array. + public JsonArray(int capacity) : base(capacity) { } + + /// + /// The json representation of the array. + /// + /// The json representation of the array. + public override string ToString() + { + return SimpleJson.SerializeObject(this) ?? string.Empty; + } + } + + /// + /// Represents the json object. + /// + [GeneratedCode("simple-json", "1.0.0")] + [EditorBrowsable(EditorBrowsableState.Never)] + [SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")] +#if SIMPLE_JSON_OBJARRAYINTERNAL + internal +#else + public +#endif + class JsonObject : +#if SIMPLE_JSON_DYNAMIC + DynamicObject, +#endif + IDictionary + { + /// + /// The internal member dictionary. + /// + private readonly Dictionary _members; + + /// + /// Initializes a new instance of . + /// + public JsonObject() + { + _members = new Dictionary(); + } + + /// + /// Initializes a new instance of . + /// + /// The implementation to use when comparing keys, or null to use the default for the type of the key. + public JsonObject(IEqualityComparer comparer) + { + _members = new Dictionary(comparer); + } + + /// + /// Gets the at the specified index. + /// + /// + public object this[int index] + { + get { return GetAtIndex(_members, index); } + } + + internal static object GetAtIndex(IDictionary obj, int index) + { + if (obj == null) + throw new ArgumentNullException("obj"); + if (index >= obj.Count) + throw new ArgumentOutOfRangeException("index"); + int i = 0; + foreach (KeyValuePair o in obj) + if (i++ == index) return o.Value; + return null; + } + + /// + /// Adds the specified key. + /// + /// The key. + /// The value. + public void Add(string key, object value) + { + _members.Add(key, value); + } + + /// + /// Determines whether the specified key contains key. + /// + /// The key. + /// + /// true if the specified key contains key; otherwise, false. + /// + public bool ContainsKey(string key) + { + return _members.ContainsKey(key); + } + + /// + /// Gets the keys. + /// + /// The keys. + public ICollection Keys + { + get { return _members.Keys; } + } + + /// + /// Removes the specified key. + /// + /// The key. + /// + public bool Remove(string key) + { + return _members.Remove(key); + } + + /// + /// Tries the get value. + /// + /// The key. + /// The value. + /// + public bool TryGetValue(string key, out object value) + { + return _members.TryGetValue(key, out value); + } + + /// + /// Gets the values. + /// + /// The values. + public ICollection Values + { + get { return _members.Values; } + } + + /// + /// Gets or sets the with the specified key. + /// + /// + public object this[string key] + { + get { return _members[key]; } + set { _members[key] = value; } + } + + /// + /// Adds the specified item. + /// + /// The item. + public void Add(KeyValuePair item) + { + _members.Add(item.Key, item.Value); + } + + /// + /// Clears this instance. + /// + public void Clear() + { + _members.Clear(); + } + + /// + /// Determines whether [contains] [the specified item]. + /// + /// The item. + /// + /// true if [contains] [the specified item]; otherwise, false. + /// + public bool Contains(KeyValuePair item) + { + return _members.ContainsKey(item.Key) && _members[item.Key] == item.Value; + } + + /// + /// Copies to. + /// + /// The array. + /// Index of the array. + public void CopyTo(KeyValuePair[] array, int arrayIndex) + { + if (array == null) throw new ArgumentNullException("array"); + int num = Count; + foreach (KeyValuePair kvp in this) + { + array[arrayIndex++] = kvp; + if (--num <= 0) + return; + } + } + + /// + /// Gets the count. + /// + /// The count. + public int Count + { + get { return _members.Count; } + } + + /// + /// Gets a value indicating whether this instance is read only. + /// + /// + /// true if this instance is read only; otherwise, false. + /// + public bool IsReadOnly + { + get { return false; } + } + + /// + /// Removes the specified item. + /// + /// The item. + /// + public bool Remove(KeyValuePair item) + { + return _members.Remove(item.Key); + } + + /// + /// Gets the enumerator. + /// + /// + public IEnumerator> GetEnumerator() + { + return _members.GetEnumerator(); + } + + /// + /// Returns an enumerator that iterates through a collection. + /// + /// + /// An object that can be used to iterate through the collection. + /// + IEnumerator IEnumerable.GetEnumerator() + { + return _members.GetEnumerator(); + } + + /// + /// Returns a json that represents the current . + /// + /// + /// A json that represents the current . + /// + public override string ToString() + { + return SimpleJson.SerializeObject(this); + } + +#if SIMPLE_JSON_DYNAMIC + /// + /// Provides implementation for type conversion operations. Classes derived from the class can override this method to specify dynamic behavior for operations that convert an object from one type to another. + /// + /// Provides information about the conversion operation. The binder.Type property provides the type to which the object must be converted. For example, for the statement (String)sampleObject in C# (CType(sampleObject, Type) in Visual Basic), where sampleObject is an instance of the class derived from the class, binder.Type returns the type. The binder.Explicit property provides information about the kind of conversion that occurs. It returns true for explicit conversion and false for implicit conversion. + /// The result of the type conversion operation. + /// + /// Alwasy returns true. + /// + public override bool TryConvert(ConvertBinder binder, out object result) + { + // + if (binder == null) + throw new ArgumentNullException("binder"); + // + Type targetType = binder.Type; + + if ((targetType == typeof(IEnumerable)) || + (targetType == typeof(IEnumerable>)) || + (targetType == typeof(IDictionary)) || + (targetType == typeof(IDictionary))) + { + result = this; + return true; + } + + return base.TryConvert(binder, out result); + } + + /// + /// Provides the implementation for operations that delete an object member. This method is not intended for use in C# or Visual Basic. + /// + /// Provides information about the deletion. + /// + /// Alwasy returns true. + /// + public override bool TryDeleteMember(DeleteMemberBinder binder) + { + // + if (binder == null) + throw new ArgumentNullException("binder"); + // + return _members.Remove(binder.Name); + } + + /// + /// Provides the implementation for operations that get a value by index. Classes derived from the class can override this method to specify dynamic behavior for indexing operations. + /// + /// Provides information about the operation. + /// The indexes that are used in the operation. For example, for the sampleObject[3] operation in C# (sampleObject(3) in Visual Basic), where sampleObject is derived from the DynamicObject class, is equal to 3. + /// The result of the index operation. + /// + /// Alwasy returns true. + /// + public override bool TryGetIndex(GetIndexBinder binder, object[] indexes, out object result) + { + if (indexes == null) throw new ArgumentNullException("indexes"); + if (indexes.Length == 1) + { + result = ((IDictionary)this)[(string)indexes[0]]; + return true; + } + result = null; + return true; + } + + /// + /// Provides the implementation for operations that get member values. Classes derived from the class can override this method to specify dynamic behavior for operations such as getting a value for a property. + /// + /// Provides information about the object that called the dynamic operation. The binder.Name property provides the name of the member on which the dynamic operation is performed. For example, for the Console.WriteLine(sampleObject.SampleProperty) statement, where sampleObject is an instance of the class derived from the class, binder.Name returns "SampleProperty". The binder.IgnoreCase property specifies whether the member name is case-sensitive. + /// The result of the get operation. For example, if the method is called for a property, you can assign the property value to . + /// + /// Alwasy returns true. + /// + public override bool TryGetMember(GetMemberBinder binder, out object result) + { + object value; + if (_members.TryGetValue(binder.Name, out value)) + { + result = value; + return true; + } + result = null; + return true; + } + + /// + /// Provides the implementation for operations that set a value by index. Classes derived from the class can override this method to specify dynamic behavior for operations that access objects by a specified index. + /// + /// Provides information about the operation. + /// The indexes that are used in the operation. For example, for the sampleObject[3] = 10 operation in C# (sampleObject(3) = 10 in Visual Basic), where sampleObject is derived from the class, is equal to 3. + /// The value to set to the object that has the specified index. For example, for the sampleObject[3] = 10 operation in C# (sampleObject(3) = 10 in Visual Basic), where sampleObject is derived from the class, is equal to 10. + /// + /// true if the operation is successful; otherwise, false. If this method returns false, the run-time binder of the language determines the behavior. (In most cases, a language-specific run-time exception is thrown. + /// + public override bool TrySetIndex(SetIndexBinder binder, object[] indexes, object value) + { + if (indexes == null) throw new ArgumentNullException("indexes"); + if (indexes.Length == 1) + { + ((IDictionary)this)[(string)indexes[0]] = value; + return true; + } + return base.TrySetIndex(binder, indexes, value); + } + + /// + /// Provides the implementation for operations that set member values. Classes derived from the class can override this method to specify dynamic behavior for operations such as setting a value for a property. + /// + /// Provides information about the object that called the dynamic operation. The binder.Name property provides the name of the member to which the value is being assigned. For example, for the statement sampleObject.SampleProperty = "Test", where sampleObject is an instance of the class derived from the class, binder.Name returns "SampleProperty". The binder.IgnoreCase property specifies whether the member name is case-sensitive. + /// The value to set to the member. For example, for sampleObject.SampleProperty = "Test", where sampleObject is an instance of the class derived from the class, the is "Test". + /// + /// true if the operation is successful; otherwise, false. If this method returns false, the run-time binder of the language determines the behavior. (In most cases, a language-specific run-time exception is thrown.) + /// + public override bool TrySetMember(SetMemberBinder binder, object value) + { + // + if (binder == null) + throw new ArgumentNullException("binder"); + // + _members[binder.Name] = value; + return true; + } + + /// + /// Returns the enumeration of all dynamic member names. + /// + /// + /// A sequence that contains dynamic member names. + /// + public override IEnumerable GetDynamicMemberNames() + { + foreach (var key in Keys) + yield return key; + } +#endif + } +} + +namespace SimpleJson +{ + /// + /// This class encodes and decodes JSON strings. + /// Spec. details, see http://www.json.org/ + /// + /// JSON uses Arrays and Objects. These correspond here to the datatypes JsonArray(IList<object>) and JsonObject(IDictionary<string,object>). + /// All numbers are parsed to doubles. + /// + [GeneratedCode("simple-json", "1.0.0")] +#if SIMPLE_JSON_INTERNAL + internal +#else + public +#endif + static class SimpleJson + { + private const int TOKEN_NONE = 0; + private const int TOKEN_CURLY_OPEN = 1; + private const int TOKEN_CURLY_CLOSE = 2; + private const int TOKEN_SQUARED_OPEN = 3; + private const int TOKEN_SQUARED_CLOSE = 4; + private const int TOKEN_COLON = 5; + private const int TOKEN_COMMA = 6; + private const int TOKEN_STRING = 7; + private const int TOKEN_NUMBER = 8; + private const int TOKEN_TRUE = 9; + private const int TOKEN_FALSE = 10; + private const int TOKEN_NULL = 11; + private const int BUILDER_CAPACITY = 2000; + + private static readonly char[] EscapeTable; + private static readonly char[] EscapeCharacters = new char[] { '"', '\\', '\b', '\f', '\n', '\r', '\t' }; + private static readonly string EscapeCharactersString = new string(EscapeCharacters); + + static SimpleJson() + { + EscapeTable = new char[93]; + EscapeTable['"'] = '"'; + EscapeTable['\\'] = '\\'; + EscapeTable['\b'] = 'b'; + EscapeTable['\f'] = 'f'; + EscapeTable['\n'] = 'n'; + EscapeTable['\r'] = 'r'; + EscapeTable['\t'] = 't'; + } + + /// + /// Parses the string json into a value + /// + /// A JSON string. + /// An IList<object>, a IDictionary<string,object>, a double, a string, null, true, or false + public static object DeserializeObject(string json) + { + object obj; + if (TryDeserializeObject(json, out obj)) + return obj; + throw new SerializationException("Invalid JSON string"); + } + + /// + /// Try parsing the json string into a value. + /// + /// + /// A JSON string. + /// + /// + /// The object. + /// + /// + /// Returns true if successfull otherwise false. + /// + [SuppressMessage("Microsoft.Design", "CA1007:UseGenericsWhereAppropriate", Justification = "Need to support .NET 2")] + public static bool TryDeserializeObject(string json, out object obj) + { + bool success = true; + if (json != null) + { + char[] charArray = json.ToCharArray(); + int index = 0; + obj = ParseValue(charArray, ref index, ref success); + } + else + obj = null; + + return success; + } + + public static object DeserializeObject(string json, Type type, IJsonSerializerStrategy jsonSerializerStrategy) + { + object jsonObject = DeserializeObject(json); + return type == null || jsonObject != null && ReflectionUtils.IsAssignableFrom(jsonObject.GetType(), type) + ? jsonObject + : (jsonSerializerStrategy ?? CurrentJsonSerializerStrategy).DeserializeObject(jsonObject, type); + } + + public static object DeserializeObject(string json, Type type) + { + return DeserializeObject(json, type, null); + } + + public static T DeserializeObject(string json, IJsonSerializerStrategy jsonSerializerStrategy) + { + return (T)DeserializeObject(json, typeof(T), jsonSerializerStrategy); + } + + public static T DeserializeObject(string json) + { + return (T)DeserializeObject(json, typeof(T), null); + } + + /// + /// Converts a IDictionary<string,object> / IList<object> object into a JSON string + /// + /// A IDictionary<string,object> / IList<object> + /// Serializer strategy to use + /// A JSON encoded string, or null if object 'json' is not serializable + public static string SerializeObject(object json, IJsonSerializerStrategy jsonSerializerStrategy) + { + StringBuilder builder = new StringBuilder(BUILDER_CAPACITY); + bool success = SerializeValue(jsonSerializerStrategy, json, builder); + return (success ? builder.ToString() : null); + } + + public static string SerializeObject(object json) + { + return SerializeObject(json, CurrentJsonSerializerStrategy); + } + + public static string EscapeToJavascriptString(string jsonString) + { + if (string.IsNullOrEmpty(jsonString)) + return jsonString; + + StringBuilder sb = new StringBuilder(); + char c; + + for (int i = 0; i < jsonString.Length;) + { + c = jsonString[i++]; + + if (c == '\\') + { + int remainingLength = jsonString.Length - i; + if (remainingLength >= 2) + { + char lookahead = jsonString[i]; + if (lookahead == '\\') + { + sb.Append('\\'); + ++i; + } + else if (lookahead == '"') + { + sb.Append("\""); + ++i; + } + else if (lookahead == 't') + { + sb.Append('\t'); + ++i; + } + else if (lookahead == 'b') + { + sb.Append('\b'); + ++i; + } + else if (lookahead == 'n') + { + sb.Append('\n'); + ++i; + } + else if (lookahead == 'r') + { + sb.Append('\r'); + ++i; + } + } + } + else + { + sb.Append(c); + } + } + return sb.ToString(); + } + + static IDictionary ParseObject(char[] json, ref int index, ref bool success) + { + IDictionary table = new JsonObject(); + int token; + + // { + NextToken(json, ref index); + + bool done = false; + while (!done) + { + token = LookAhead(json, index); + if (token == TOKEN_NONE) + { + success = false; + return null; + } + else if (token == TOKEN_COMMA) + NextToken(json, ref index); + else if (token == TOKEN_CURLY_CLOSE) + { + NextToken(json, ref index); + return table; + } + else + { + // name + string name = ParseString(json, ref index, ref success); + if (!success) + { + success = false; + return null; + } + // : + token = NextToken(json, ref index); + if (token != TOKEN_COLON) + { + success = false; + return null; + } + // value + object value = ParseValue(json, ref index, ref success); + if (!success) + { + success = false; + return null; + } + table[name] = value; + } + } + return table; + } + + static JsonArray ParseArray(char[] json, ref int index, ref bool success) + { + JsonArray array = new JsonArray(); + + // [ + NextToken(json, ref index); + + bool done = false; + while (!done) + { + int token = LookAhead(json, index); + if (token == TOKEN_NONE) + { + success = false; + return null; + } + else if (token == TOKEN_COMMA) + NextToken(json, ref index); + else if (token == TOKEN_SQUARED_CLOSE) + { + NextToken(json, ref index); + break; + } + else + { + object value = ParseValue(json, ref index, ref success); + if (!success) + return null; + array.Add(value); + } + } + return array; + } + + static object ParseValue(char[] json, ref int index, ref bool success) + { + switch (LookAhead(json, index)) + { + case TOKEN_STRING: + return ParseString(json, ref index, ref success); + case TOKEN_NUMBER: + return ParseNumber(json, ref index, ref success); + case TOKEN_CURLY_OPEN: + return ParseObject(json, ref index, ref success); + case TOKEN_SQUARED_OPEN: + return ParseArray(json, ref index, ref success); + case TOKEN_TRUE: + NextToken(json, ref index); + return true; + case TOKEN_FALSE: + NextToken(json, ref index); + return false; + case TOKEN_NULL: + NextToken(json, ref index); + return null; + case TOKEN_NONE: + break; + } + success = false; + return null; + } + + static string ParseString(char[] json, ref int index, ref bool success) + { + StringBuilder s = new StringBuilder(BUILDER_CAPACITY); + char c; + + EatWhitespace(json, ref index); + + // " + c = json[index++]; + bool complete = false; + while (!complete) + { + if (index == json.Length) + break; + + c = json[index++]; + if (c == '"') + { + complete = true; + break; + } + else if (c == '\\') + { + if (index == json.Length) + break; + c = json[index++]; + if (c == '"') + s.Append('"'); + else if (c == '\\') + s.Append('\\'); + else if (c == '/') + s.Append('/'); + else if (c == 'b') + s.Append('\b'); + else if (c == 'f') + s.Append('\f'); + else if (c == 'n') + s.Append('\n'); + else if (c == 'r') + s.Append('\r'); + else if (c == 't') + s.Append('\t'); + else if (c == 'u') + { + int remainingLength = json.Length - index; + if (remainingLength >= 4) + { + // parse the 32 bit hex into an integer codepoint + uint codePoint; + if (!(success = UInt32.TryParse(new string(json, index, 4), NumberStyles.HexNumber, CultureInfo.InvariantCulture, out codePoint))) + return ""; + + // convert the integer codepoint to a unicode char and add to string + if (0xD800 <= codePoint && codePoint <= 0xDBFF) // if high surrogate + { + index += 4; // skip 4 chars + remainingLength = json.Length - index; + if (remainingLength >= 6) + { + uint lowCodePoint; + if (new string(json, index, 2) == "\\u" && UInt32.TryParse(new string(json, index + 2, 4), NumberStyles.HexNumber, CultureInfo.InvariantCulture, out lowCodePoint)) + { + if (0xDC00 <= lowCodePoint && lowCodePoint <= 0xDFFF) // if low surrogate + { + s.Append((char)codePoint); + s.Append((char)lowCodePoint); + index += 6; // skip 6 chars + continue; + } + } + } + success = false; // invalid surrogate pair + return ""; + } + s.Append(ConvertFromUtf32((int)codePoint)); + // skip 4 chars + index += 4; + } + else + break; + } + } + else + s.Append(c); + } + if (!complete) + { + success = false; + return null; + } + return s.ToString(); + } + + private static string ConvertFromUtf32(int utf32) + { + // http://www.java2s.com/Open-Source/CSharp/2.6.4-mono-.net-core/System/System/Char.cs.htm + if (utf32 < 0 || utf32 > 0x10FFFF) + throw new ArgumentOutOfRangeException("utf32", "The argument must be from 0 to 0x10FFFF."); + if (0xD800 <= utf32 && utf32 <= 0xDFFF) + throw new ArgumentOutOfRangeException("utf32", "The argument must not be in surrogate pair range."); + if (utf32 < 0x10000) + return new string((char)utf32, 1); + utf32 -= 0x10000; + return new string(new char[] { (char)((utf32 >> 10) + 0xD800), (char)(utf32 % 0x0400 + 0xDC00) }); + } + + static object ParseNumber(char[] json, ref int index, ref bool success) + { + EatWhitespace(json, ref index); + int lastIndex = GetLastIndexOfNumber(json, index); + int charLength = (lastIndex - index) + 1; + object returnNumber; + string str = new string(json, index, charLength); + if (str.IndexOf(".", StringComparison.OrdinalIgnoreCase) != -1 || str.IndexOf("e", StringComparison.OrdinalIgnoreCase) != -1) + { + double number; + success = double.TryParse(new string(json, index, charLength), NumberStyles.Any, CultureInfo.InvariantCulture, out number); + returnNumber = number; + } + else + { + long number; + success = long.TryParse(new string(json, index, charLength), NumberStyles.Any, CultureInfo.InvariantCulture, out number); + returnNumber = number; + } + index = lastIndex + 1; + return returnNumber; + } + + static int GetLastIndexOfNumber(char[] json, int index) + { + int lastIndex; + for (lastIndex = index; lastIndex < json.Length; lastIndex++) + if ("0123456789+-.eE".IndexOf(json[lastIndex]) == -1) break; + return lastIndex - 1; + } + + static void EatWhitespace(char[] json, ref int index) + { + for (; index < json.Length; index++) + if (" \t\n\r\b\f".IndexOf(json[index]) == -1) break; + } + + static int LookAhead(char[] json, int index) + { + int saveIndex = index; + return NextToken(json, ref saveIndex); + } + + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + static int NextToken(char[] json, ref int index) + { + EatWhitespace(json, ref index); + if (index == json.Length) + return TOKEN_NONE; + char c = json[index]; + index++; + switch (c) + { + case '{': + return TOKEN_CURLY_OPEN; + case '}': + return TOKEN_CURLY_CLOSE; + case '[': + return TOKEN_SQUARED_OPEN; + case ']': + return TOKEN_SQUARED_CLOSE; + case ',': + return TOKEN_COMMA; + case '"': + return TOKEN_STRING; + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + case '-': + return TOKEN_NUMBER; + case ':': + return TOKEN_COLON; + } + index--; + int remainingLength = json.Length - index; + // false + if (remainingLength >= 5) + { + if (json[index] == 'f' && json[index + 1] == 'a' && json[index + 2] == 'l' && json[index + 3] == 's' && json[index + 4] == 'e') + { + index += 5; + return TOKEN_FALSE; + } + } + // true + if (remainingLength >= 4) + { + if (json[index] == 't' && json[index + 1] == 'r' && json[index + 2] == 'u' && json[index + 3] == 'e') + { + index += 4; + return TOKEN_TRUE; + } + } + // null + if (remainingLength >= 4) + { + if (json[index] == 'n' && json[index + 1] == 'u' && json[index + 2] == 'l' && json[index + 3] == 'l') + { + index += 4; + return TOKEN_NULL; + } + } + return TOKEN_NONE; + } + + static bool SerializeValue(IJsonSerializerStrategy jsonSerializerStrategy, object value, StringBuilder builder) + { + bool success = true; + string stringValue = value as string; + if (stringValue != null) + success = SerializeString(stringValue, builder); + else + { + IDictionary dict = value as IDictionary; + if (dict != null) + { + success = SerializeObject(jsonSerializerStrategy, dict.Keys, dict.Values, builder); + } + else + { + IDictionary stringDictionary = value as IDictionary; + if (stringDictionary != null) + { + success = SerializeObject(jsonSerializerStrategy, stringDictionary.Keys, stringDictionary.Values, builder); + } + else + { + IEnumerable enumerableValue = value as IEnumerable; + if (enumerableValue != null) + success = SerializeArray(jsonSerializerStrategy, enumerableValue, builder); + else if (IsNumeric(value)) + success = SerializeNumber(value, builder); + else if (value is bool) + builder.Append((bool)value ? "true" : "false"); + else if (value == null) + builder.Append("null"); + else + { + object serializedObject; + success = jsonSerializerStrategy.TrySerializeNonPrimitiveObject(value, out serializedObject); + if (success) + SerializeValue(jsonSerializerStrategy, serializedObject, builder); + } + } + } + } + return success; + } + + static bool SerializeObject(IJsonSerializerStrategy jsonSerializerStrategy, IEnumerable keys, IEnumerable values, StringBuilder builder) + { + builder.Append("{"); + IEnumerator ke = keys.GetEnumerator(); + IEnumerator ve = values.GetEnumerator(); + bool first = true; + while (ke.MoveNext() && ve.MoveNext()) + { + object key = ke.Current; + object value = ve.Current; + if (!first) + builder.Append(","); + string stringKey = key as string; + if (stringKey != null) + SerializeString(stringKey, builder); + else + if (!SerializeValue(jsonSerializerStrategy, value, builder)) return false; + builder.Append(":"); + if (!SerializeValue(jsonSerializerStrategy, value, builder)) + return false; + first = false; + } + builder.Append("}"); + return true; + } + + static bool SerializeArray(IJsonSerializerStrategy jsonSerializerStrategy, IEnumerable anArray, StringBuilder builder) + { + builder.Append("["); + bool first = true; + foreach (object value in anArray) + { + if (!first) + builder.Append(","); + if (!SerializeValue(jsonSerializerStrategy, value, builder)) + return false; + first = false; + } + builder.Append("]"); + return true; + } + + static bool SerializeString(string aString, StringBuilder builder) + { + // Happy path if there's nothing to be escaped. IndexOfAny is highly optimized (and unmanaged) + if (aString.IndexOfAny(EscapeCharacters) == -1) + { + builder.Append('"'); + builder.Append(aString); + builder.Append('"'); + + return true; + } + + builder.Append('"'); + int safeCharacterCount = 0; + char[] charArray = aString.ToCharArray(); + + for (int i = 0; i < charArray.Length; i++) + { + char c = charArray[i]; + + // Non ascii characters are fine, buffer them up and send them to the builder + // in larger chunks if possible. The escape table is a 1:1 translation table + // with \0 [default(char)] denoting a safe character. + if (c >= EscapeTable.Length || EscapeTable[c] == default(char)) + { + safeCharacterCount++; + } + else + { + if (safeCharacterCount > 0) + { + builder.Append(charArray, i - safeCharacterCount, safeCharacterCount); + safeCharacterCount = 0; + } + + builder.Append('\\'); + builder.Append(EscapeTable[c]); + } + } + + if (safeCharacterCount > 0) + { + builder.Append(charArray, charArray.Length - safeCharacterCount, safeCharacterCount); + } + + builder.Append('"'); + return true; + } + + static bool SerializeNumber(object number, StringBuilder builder) + { + if (number is long) + builder.Append(((long)number).ToString(CultureInfo.InvariantCulture)); + else if (number is ulong) + builder.Append(((ulong)number).ToString(CultureInfo.InvariantCulture)); + else if (number is int) + builder.Append(((int)number).ToString(CultureInfo.InvariantCulture)); + else if (number is uint) + builder.Append(((uint)number).ToString(CultureInfo.InvariantCulture)); + else if (number is decimal) + builder.Append(((decimal)number).ToString(CultureInfo.InvariantCulture)); + else if (number is float) + builder.Append(((float)number).ToString(CultureInfo.InvariantCulture)); + else + builder.Append(Convert.ToDouble(number, CultureInfo.InvariantCulture).ToString("r", CultureInfo.InvariantCulture)); + return true; + } + + /// + /// Determines if a given object is numeric in any way + /// (can be integer, double, null, etc). + /// + static bool IsNumeric(object value) + { + if (value is sbyte) return true; + if (value is byte) return true; + if (value is short) return true; + if (value is ushort) return true; + if (value is int) return true; + if (value is uint) return true; + if (value is long) return true; + if (value is ulong) return true; + if (value is float) return true; + if (value is double) return true; + if (value is decimal) return true; + return false; + } + + private static IJsonSerializerStrategy _currentJsonSerializerStrategy; + public static IJsonSerializerStrategy CurrentJsonSerializerStrategy + { + get + { + return _currentJsonSerializerStrategy ?? + (_currentJsonSerializerStrategy = +#if SIMPLE_JSON_DATACONTRACT + DataContractJsonSerializerStrategy +#else + PocoJsonSerializerStrategy +#endif +); + } + set + { + _currentJsonSerializerStrategy = value; + } + } + + private static PocoJsonSerializerStrategy _pocoJsonSerializerStrategy; + [EditorBrowsable(EditorBrowsableState.Advanced)] + public static PocoJsonSerializerStrategy PocoJsonSerializerStrategy + { + get + { + return _pocoJsonSerializerStrategy ?? (_pocoJsonSerializerStrategy = new PocoJsonSerializerStrategy()); + } + } + +#if SIMPLE_JSON_DATACONTRACT + + private static DataContractJsonSerializerStrategy _dataContractJsonSerializerStrategy; + [System.ComponentModel.EditorBrowsable(EditorBrowsableState.Advanced)] + public static DataContractJsonSerializerStrategy DataContractJsonSerializerStrategy + { + get + { + return _dataContractJsonSerializerStrategy ?? (_dataContractJsonSerializerStrategy = new DataContractJsonSerializerStrategy()); + } + } + +#endif + } + + [GeneratedCode("simple-json", "1.0.0")] +#if SIMPLE_JSON_INTERNAL + internal +#else + public +#endif + interface IJsonSerializerStrategy + { + [SuppressMessage("Microsoft.Design", "CA1007:UseGenericsWhereAppropriate", Justification = "Need to support .NET 2")] + bool TrySerializeNonPrimitiveObject(object input, out object output); + object DeserializeObject(object value, Type type); + } + + [GeneratedCode("simple-json", "1.0.0")] +#if SIMPLE_JSON_INTERNAL + internal +#else + public +#endif + class PocoJsonSerializerStrategy : IJsonSerializerStrategy + { + internal IDictionary ConstructorCache; + internal IDictionary> GetCache; + internal IDictionary>> SetCache; + + internal static readonly Type[] EmptyTypes = new Type[0]; + internal static readonly Type[] ArrayConstructorParameterTypes = new Type[] { typeof(int) }; + + private static readonly string[] Iso8601Format = new string[] + { + @"yyyy-MM-dd\THH:mm:ss.FFFFFFF\Z", + @"yyyy-MM-dd\THH:mm:ss\Z", + @"yyyy-MM-dd\THH:mm:ssK" + }; + + public PocoJsonSerializerStrategy() + { + ConstructorCache = new ReflectionUtils.ThreadSafeDictionary(ContructorDelegateFactory); + GetCache = new ReflectionUtils.ThreadSafeDictionary>(GetterValueFactory); + SetCache = new ReflectionUtils.ThreadSafeDictionary>>(SetterValueFactory); + } + + protected virtual string MapClrMemberNameToJsonFieldName(string clrPropertyName) + { + return clrPropertyName; + } + + internal virtual ReflectionUtils.ConstructorDelegate ContructorDelegateFactory(Type key) + { + return ReflectionUtils.GetContructor(key, key.IsArray ? ArrayConstructorParameterTypes : EmptyTypes); + } + + internal virtual IDictionary GetterValueFactory(Type type) + { + IDictionary result = new Dictionary(); + foreach (PropertyInfo propertyInfo in ReflectionUtils.GetProperties(type)) + { + if (propertyInfo.CanRead) + { + MethodInfo getMethod = ReflectionUtils.GetGetterMethodInfo(propertyInfo); + if (getMethod.IsStatic || !getMethod.IsPublic) + continue; + result[MapClrMemberNameToJsonFieldName(propertyInfo.Name)] = ReflectionUtils.GetGetMethod(propertyInfo); + } + } + foreach (FieldInfo fieldInfo in ReflectionUtils.GetFields(type)) + { + if (fieldInfo.IsStatic || !fieldInfo.IsPublic) + continue; + result[MapClrMemberNameToJsonFieldName(fieldInfo.Name)] = ReflectionUtils.GetGetMethod(fieldInfo); + } + return result; + } + + internal virtual IDictionary> SetterValueFactory(Type type) + { + IDictionary> result = new Dictionary>(); + foreach (PropertyInfo propertyInfo in ReflectionUtils.GetProperties(type)) + { + if (propertyInfo.CanWrite) + { + MethodInfo setMethod = ReflectionUtils.GetSetterMethodInfo(propertyInfo); + if (setMethod.IsStatic || !setMethod.IsPublic) + continue; + result[MapClrMemberNameToJsonFieldName(propertyInfo.Name)] = new KeyValuePair(propertyInfo.PropertyType, ReflectionUtils.GetSetMethod(propertyInfo)); + } + } + foreach (FieldInfo fieldInfo in ReflectionUtils.GetFields(type)) + { + if (fieldInfo.IsInitOnly || fieldInfo.IsStatic || !fieldInfo.IsPublic) + continue; + result[MapClrMemberNameToJsonFieldName(fieldInfo.Name)] = new KeyValuePair(fieldInfo.FieldType, ReflectionUtils.GetSetMethod(fieldInfo)); + } + return result; + } + + public virtual bool TrySerializeNonPrimitiveObject(object input, out object output) + { + return TrySerializeKnownTypes(input, out output) || TrySerializeUnknownTypes(input, out output); + } + + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual object DeserializeObject(object value, Type type) + { + if (type == null) throw new ArgumentNullException("type"); + string str = value as string; + + if (type == typeof(Guid) && string.IsNullOrEmpty(str)) + return default(Guid); + + if (value == null) + return null; + + object obj = null; + + if (str != null) + { + if (str.Length != 0) // We know it can't be null now. + { + if (type == typeof(DateTime) || (ReflectionUtils.IsNullableType(type) && Nullable.GetUnderlyingType(type) == typeof(DateTime))) + return DateTime.ParseExact(str, Iso8601Format, CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal | DateTimeStyles.AdjustToUniversal); + if (type == typeof(DateTimeOffset) || (ReflectionUtils.IsNullableType(type) && Nullable.GetUnderlyingType(type) == typeof(DateTimeOffset))) + return DateTimeOffset.ParseExact(str, Iso8601Format, CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal | DateTimeStyles.AdjustToUniversal); + if (type == typeof(Guid) || (ReflectionUtils.IsNullableType(type) && Nullable.GetUnderlyingType(type) == typeof(Guid))) + return new Guid(str); + if (type == typeof(Uri)) + { + bool isValid = Uri.IsWellFormedUriString(str, UriKind.RelativeOrAbsolute); + + Uri result; + if (isValid && Uri.TryCreate(str, UriKind.RelativeOrAbsolute, out result)) + return result; + + return null; + } + + if (type == typeof(string)) + return str; + + return Convert.ChangeType(str, type, CultureInfo.InvariantCulture); + } + else + { + if (type == typeof(Guid)) + obj = default(Guid); + else if (ReflectionUtils.IsNullableType(type) && Nullable.GetUnderlyingType(type) == typeof(Guid)) + obj = null; + else + obj = str; + } + // Empty string case + if (!ReflectionUtils.IsNullableType(type) && Nullable.GetUnderlyingType(type) == typeof(Guid)) + return str; + } + else if (value is bool) + return value; + + bool valueIsLong = value is long; + bool valueIsDouble = value is double; + if ((valueIsLong && type == typeof(long)) || (valueIsDouble && type == typeof(double))) + return value; + if ((valueIsDouble && type != typeof(double)) || (valueIsLong && type != typeof(long))) + { + obj = type == typeof(int) || type == typeof(long) || type == typeof(double) || type == typeof(float) || type == typeof(bool) || type == typeof(decimal) || type == typeof(byte) || type == typeof(short) + ? Convert.ChangeType(value, type, CultureInfo.InvariantCulture) + : value; + } + else + { + IDictionary objects = value as IDictionary; + if (objects != null) + { + IDictionary jsonObject = objects; + + if (ReflectionUtils.IsTypeDictionary(type)) + { + // if dictionary then + Type[] types = ReflectionUtils.GetGenericTypeArguments(type); + Type keyType = types[0]; + Type valueType = types[1]; + + Type genericType = typeof(Dictionary<,>).MakeGenericType(keyType, valueType); + + IDictionary dict = (IDictionary)ConstructorCache[genericType](); + + foreach (KeyValuePair kvp in jsonObject) + dict.Add(kvp.Key, DeserializeObject(kvp.Value, valueType)); + + obj = dict; + } + else + { + if (type == typeof(object)) + obj = value; + else + { + obj = ConstructorCache[type](); + foreach (KeyValuePair> setter in SetCache[type]) + { + object jsonValue; + if (jsonObject.TryGetValue(setter.Key, out jsonValue)) + { + jsonValue = DeserializeObject(jsonValue, setter.Value.Key); + setter.Value.Value(obj, jsonValue); + } + } + } + } + } + else + { + IList valueAsList = value as IList; + if (valueAsList != null) + { + IList jsonObject = valueAsList; + IList list = null; + + if (type.IsArray) + { + list = (IList)ConstructorCache[type](jsonObject.Count); + int i = 0; + foreach (object o in jsonObject) + list[i++] = DeserializeObject(o, type.GetElementType()); + } + else if (ReflectionUtils.IsTypeGenericeCollectionInterface(type) || ReflectionUtils.IsAssignableFrom(typeof(IList), type)) + { + Type innerType = ReflectionUtils.GetGenericListElementType(type); + list = (IList)(ConstructorCache[type] ?? ConstructorCache[typeof(List<>).MakeGenericType(innerType)])(jsonObject.Count); + foreach (object o in jsonObject) + list.Add(DeserializeObject(o, innerType)); + } + obj = list; + } + } + return obj; + } + if (ReflectionUtils.IsNullableType(type)) + return ReflectionUtils.ToNullableType(obj, type); + return obj; + } + + protected virtual object SerializeEnum(Enum p) + { + return Convert.ToDouble(p, CultureInfo.InvariantCulture); + } + + [SuppressMessage("Microsoft.Design", "CA1007:UseGenericsWhereAppropriate", Justification = "Need to support .NET 2")] + protected virtual bool TrySerializeKnownTypes(object input, out object output) + { + bool returnValue = true; + if (input is DateTime) + output = ((DateTime)input).ToUniversalTime().ToString(Iso8601Format[0], CultureInfo.InvariantCulture); + else if (input is DateTimeOffset) + output = ((DateTimeOffset)input).ToUniversalTime().ToString(Iso8601Format[0], CultureInfo.InvariantCulture); + else if (input is Guid) + output = ((Guid)input).ToString("D"); + else if (input is Uri) + output = input.ToString(); + else + { + Enum inputEnum = input as Enum; + if (inputEnum != null) + output = SerializeEnum(inputEnum); + else + { + returnValue = false; + output = null; + } + } + return returnValue; + } + [SuppressMessage("Microsoft.Design", "CA1007:UseGenericsWhereAppropriate", Justification = "Need to support .NET 2")] + protected virtual bool TrySerializeUnknownTypes(object input, out object output) + { + if (input == null) throw new ArgumentNullException("input"); + output = null; + Type type = input.GetType(); + if (type.FullName == null) + return false; + IDictionary obj = new JsonObject(); + IDictionary getters = GetCache[type]; + foreach (KeyValuePair getter in getters) + { + if (getter.Value != null) + obj.Add(MapClrMemberNameToJsonFieldName(getter.Key), getter.Value(input)); + } + output = obj; + return true; + } + } + +#if SIMPLE_JSON_DATACONTRACT + [GeneratedCode("simple-json", "1.0.0")] +#if SIMPLE_JSON_INTERNAL + internal +#else + public +#endif + class DataContractJsonSerializerStrategy : PocoJsonSerializerStrategy + { + public DataContractJsonSerializerStrategy() + { + GetCache = new ReflectionUtils.ThreadSafeDictionary>(GetterValueFactory); + SetCache = new ReflectionUtils.ThreadSafeDictionary>>(SetterValueFactory); + } + + internal override IDictionary GetterValueFactory(Type type) + { + bool hasDataContract = ReflectionUtils.GetAttribute(type, typeof(DataContractAttribute)) != null; + if (!hasDataContract) + return base.GetterValueFactory(type); + string jsonKey; + IDictionary result = new Dictionary(); + foreach (PropertyInfo propertyInfo in ReflectionUtils.GetProperties(type)) + { + if (propertyInfo.CanRead) + { + MethodInfo getMethod = ReflectionUtils.GetGetterMethodInfo(propertyInfo); + if (!getMethod.IsStatic && CanAdd(propertyInfo, out jsonKey)) + result[jsonKey] = ReflectionUtils.GetGetMethod(propertyInfo); + } + } + foreach (FieldInfo fieldInfo in ReflectionUtils.GetFields(type)) + { + if (!fieldInfo.IsStatic && CanAdd(fieldInfo, out jsonKey)) + result[jsonKey] = ReflectionUtils.GetGetMethod(fieldInfo); + } + return result; + } + + internal override IDictionary> SetterValueFactory(Type type) + { + bool hasDataContract = ReflectionUtils.GetAttribute(type, typeof(DataContractAttribute)) != null; + if (!hasDataContract) + return base.SetterValueFactory(type); + string jsonKey; + IDictionary> result = new Dictionary>(); + foreach (PropertyInfo propertyInfo in ReflectionUtils.GetProperties(type)) + { + if (propertyInfo.CanWrite) + { + MethodInfo setMethod = ReflectionUtils.GetSetterMethodInfo(propertyInfo); + if (!setMethod.IsStatic && CanAdd(propertyInfo, out jsonKey)) + result[jsonKey] = new KeyValuePair(propertyInfo.PropertyType, ReflectionUtils.GetSetMethod(propertyInfo)); + } + } + foreach (FieldInfo fieldInfo in ReflectionUtils.GetFields(type)) + { + if (!fieldInfo.IsInitOnly && !fieldInfo.IsStatic && CanAdd(fieldInfo, out jsonKey)) + result[jsonKey] = new KeyValuePair(fieldInfo.FieldType, ReflectionUtils.GetSetMethod(fieldInfo)); + } + // todo implement sorting for DATACONTRACT. + return result; + } + + private static bool CanAdd(MemberInfo info, out string jsonKey) + { + jsonKey = null; + if (ReflectionUtils.GetAttribute(info, typeof(IgnoreDataMemberAttribute)) != null) + return false; + DataMemberAttribute dataMemberAttribute = (DataMemberAttribute)ReflectionUtils.GetAttribute(info, typeof(DataMemberAttribute)); + if (dataMemberAttribute == null) + return false; + jsonKey = string.IsNullOrEmpty(dataMemberAttribute.Name) ? info.Name : dataMemberAttribute.Name; + return true; + } + } + +#endif + + namespace Reflection + { + // This class is meant to be copied into other libraries. So we want to exclude it from Code Analysis rules + // that might be in place in the target project. + [GeneratedCode("reflection-utils", "1.0.0")] +#if SIMPLE_JSON_REFLECTION_UTILS_PUBLIC + public +#else + internal +#endif + class ReflectionUtils + { + private static readonly object[] EmptyObjects = new object[] { }; + + public delegate object GetDelegate(object source); + public delegate void SetDelegate(object source, object value); + public delegate object ConstructorDelegate(params object[] args); + + public delegate TValue ThreadSafeDictionaryValueFactory(TKey key); + +#if SIMPLE_JSON_TYPEINFO + public static TypeInfo GetTypeInfo(Type type) + { + return type.GetTypeInfo(); + } +#else + public static Type GetTypeInfo(Type type) + { + return type; + } +#endif + + public static Attribute GetAttribute(MemberInfo info, Type type) + { +#if SIMPLE_JSON_TYPEINFO + if (info == null || type == null || !info.IsDefined(type)) + return null; + return info.GetCustomAttribute(type); +#else + if (info == null || type == null || !Attribute.IsDefined(info, type)) + return null; + return Attribute.GetCustomAttribute(info, type); +#endif + } + + public static Type GetGenericListElementType(Type type) + { + IEnumerable interfaces; +#if SIMPLE_JSON_TYPEINFO + interfaces = type.GetTypeInfo().ImplementedInterfaces; +#else + interfaces = type.GetInterfaces(); +#endif + foreach (Type implementedInterface in interfaces) + { + if (IsTypeGeneric(implementedInterface) && + implementedInterface.GetGenericTypeDefinition() == typeof(IList<>)) + { + return GetGenericTypeArguments(implementedInterface)[0]; + } + } + return GetGenericTypeArguments(type)[0]; + } + + public static Attribute GetAttribute(Type objectType, Type attributeType) + { + +#if SIMPLE_JSON_TYPEINFO + if (objectType == null || attributeType == null || !objectType.GetTypeInfo().IsDefined(attributeType)) + return null; + return objectType.GetTypeInfo().GetCustomAttribute(attributeType); +#else + if (objectType == null || attributeType == null || !Attribute.IsDefined(objectType, attributeType)) + return null; + return Attribute.GetCustomAttribute(objectType, attributeType); +#endif + } + + public static Type[] GetGenericTypeArguments(Type type) + { +#if SIMPLE_JSON_TYPEINFO + return type.GetTypeInfo().GenericTypeArguments; +#else + return type.GetGenericArguments(); +#endif + } + + public static bool IsTypeGeneric(Type type) + { + return GetTypeInfo(type).IsGenericType; + } + + public static bool IsTypeGenericeCollectionInterface(Type type) + { + if (!IsTypeGeneric(type)) + return false; + + Type genericDefinition = type.GetGenericTypeDefinition(); + + return (genericDefinition == typeof(IList<>) + || genericDefinition == typeof(ICollection<>) + || genericDefinition == typeof(IEnumerable<>) +#if SIMPLE_JSON_READONLY_COLLECTIONS + || genericDefinition == typeof(IReadOnlyCollection<>) + || genericDefinition == typeof(IReadOnlyList<>) +#endif + ); + } + + public static bool IsAssignableFrom(Type type1, Type type2) + { + return GetTypeInfo(type1).IsAssignableFrom(GetTypeInfo(type2)); + } + + public static bool IsTypeDictionary(Type type) + { +#if SIMPLE_JSON_TYPEINFO + if (typeof(IDictionary<,>).GetTypeInfo().IsAssignableFrom(type.GetTypeInfo())) + return true; +#else + if (typeof(System.Collections.IDictionary).IsAssignableFrom(type)) + return true; +#endif + if (!GetTypeInfo(type).IsGenericType) + return false; + + Type genericDefinition = type.GetGenericTypeDefinition(); + return genericDefinition == typeof(IDictionary<,>); + } + + public static bool IsNullableType(Type type) + { + return GetTypeInfo(type).IsGenericType && type.GetGenericTypeDefinition() == typeof(Nullable<>); + } + + public static object ToNullableType(object obj, Type nullableType) + { + return obj == null ? null : Convert.ChangeType(obj, Nullable.GetUnderlyingType(nullableType), CultureInfo.InvariantCulture); + } + + public static bool IsValueType(Type type) + { + return GetTypeInfo(type).IsValueType; + } + + public static IEnumerable GetConstructors(Type type) + { +#if SIMPLE_JSON_TYPEINFO + return type.GetTypeInfo().DeclaredConstructors; +#else + return type.GetConstructors(); +#endif + } + + public static ConstructorInfo GetConstructorInfo(Type type, params Type[] argsType) + { + IEnumerable constructorInfos = GetConstructors(type); + int i; + bool matches; + foreach (ConstructorInfo constructorInfo in constructorInfos) + { + ParameterInfo[] parameters = constructorInfo.GetParameters(); + if (argsType.Length != parameters.Length) + continue; + + i = 0; + matches = true; + foreach (ParameterInfo parameterInfo in constructorInfo.GetParameters()) + { + if (parameterInfo.ParameterType != argsType[i]) + { + matches = false; + break; + } + } + + if (matches) + return constructorInfo; + } + + return null; + } + + public static IEnumerable GetProperties(Type type) + { +#if SIMPLE_JSON_TYPEINFO + return type.GetRuntimeProperties(); +#else + return type.GetProperties(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static); +#endif + } + + public static IEnumerable GetFields(Type type) + { +#if SIMPLE_JSON_TYPEINFO + return type.GetRuntimeFields(); +#else + return type.GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static); +#endif + } + + public static MethodInfo GetGetterMethodInfo(PropertyInfo propertyInfo) + { +#if SIMPLE_JSON_TYPEINFO + return propertyInfo.GetMethod; +#else + return propertyInfo.GetGetMethod(true); +#endif + } + + public static MethodInfo GetSetterMethodInfo(PropertyInfo propertyInfo) + { +#if SIMPLE_JSON_TYPEINFO + return propertyInfo.SetMethod; +#else + return propertyInfo.GetSetMethod(true); +#endif + } + + public static ConstructorDelegate GetContructor(ConstructorInfo constructorInfo) + { +#if SIMPLE_JSON_NO_LINQ_EXPRESSION + return GetConstructorByReflection(constructorInfo); +#else + return GetConstructorByExpression(constructorInfo); +#endif + } + + public static ConstructorDelegate GetContructor(Type type, params Type[] argsType) + { +#if SIMPLE_JSON_NO_LINQ_EXPRESSION + return GetConstructorByReflection(type, argsType); +#else + return GetConstructorByExpression(type, argsType); +#endif + } + + public static ConstructorDelegate GetConstructorByReflection(ConstructorInfo constructorInfo) + { + return delegate (object[] args) { return constructorInfo.Invoke(args); }; + } + + public static ConstructorDelegate GetConstructorByReflection(Type type, params Type[] argsType) + { + ConstructorInfo constructorInfo = GetConstructorInfo(type, argsType); + return constructorInfo == null ? null : GetConstructorByReflection(constructorInfo); + } + +#if !SIMPLE_JSON_NO_LINQ_EXPRESSION + + public static ConstructorDelegate GetConstructorByExpression(ConstructorInfo constructorInfo) + { + ParameterInfo[] paramsInfo = constructorInfo.GetParameters(); + ParameterExpression param = Expression.Parameter(typeof(object[]), "args"); + Expression[] argsExp = new Expression[paramsInfo.Length]; + for (int i = 0; i < paramsInfo.Length; i++) + { + Expression index = Expression.Constant(i); + Type paramType = paramsInfo[i].ParameterType; + Expression paramAccessorExp = Expression.ArrayIndex(param, index); + Expression paramCastExp = Expression.Convert(paramAccessorExp, paramType); + argsExp[i] = paramCastExp; + } + NewExpression newExp = Expression.New(constructorInfo, argsExp); + Expression> lambda = Expression.Lambda>(newExp, param); + Func compiledLambda = lambda.Compile(); + return delegate (object[] args) { return compiledLambda(args); }; + } + + public static ConstructorDelegate GetConstructorByExpression(Type type, params Type[] argsType) + { + ConstructorInfo constructorInfo = GetConstructorInfo(type, argsType); + return constructorInfo == null ? null : GetConstructorByExpression(constructorInfo); + } + +#endif + + public static GetDelegate GetGetMethod(PropertyInfo propertyInfo) + { +#if SIMPLE_JSON_NO_LINQ_EXPRESSION + return GetGetMethodByReflection(propertyInfo); +#else + return GetGetMethodByExpression(propertyInfo); +#endif + } + + public static GetDelegate GetGetMethod(FieldInfo fieldInfo) + { +#if SIMPLE_JSON_NO_LINQ_EXPRESSION + return GetGetMethodByReflection(fieldInfo); +#else + return GetGetMethodByExpression(fieldInfo); +#endif + } + + public static GetDelegate GetGetMethodByReflection(PropertyInfo propertyInfo) + { + MethodInfo methodInfo = GetGetterMethodInfo(propertyInfo); + return delegate (object source) { return methodInfo.Invoke(source, EmptyObjects); }; + } + + public static GetDelegate GetGetMethodByReflection(FieldInfo fieldInfo) + { + return delegate (object source) { return fieldInfo.GetValue(source); }; + } + +#if !SIMPLE_JSON_NO_LINQ_EXPRESSION + + public static GetDelegate GetGetMethodByExpression(PropertyInfo propertyInfo) + { + MethodInfo getMethodInfo = GetGetterMethodInfo(propertyInfo); + ParameterExpression instance = Expression.Parameter(typeof(object), "instance"); + UnaryExpression instanceCast = (!IsValueType(propertyInfo.DeclaringType)) ? Expression.TypeAs(instance, propertyInfo.DeclaringType) : Expression.Convert(instance, propertyInfo.DeclaringType); + Func compiled = Expression.Lambda>(Expression.TypeAs(Expression.Call(instanceCast, getMethodInfo), typeof(object)), instance).Compile(); + return delegate (object source) { return compiled(source); }; + } + + public static GetDelegate GetGetMethodByExpression(FieldInfo fieldInfo) + { + ParameterExpression instance = Expression.Parameter(typeof(object), "instance"); + MemberExpression member = Expression.Field(Expression.Convert(instance, fieldInfo.DeclaringType), fieldInfo); + GetDelegate compiled = Expression.Lambda(Expression.Convert(member, typeof(object)), instance).Compile(); + return delegate (object source) { return compiled(source); }; + } + +#endif + + public static SetDelegate GetSetMethod(PropertyInfo propertyInfo) + { +#if SIMPLE_JSON_NO_LINQ_EXPRESSION + return GetSetMethodByReflection(propertyInfo); +#else + return GetSetMethodByExpression(propertyInfo); +#endif + } + + public static SetDelegate GetSetMethod(FieldInfo fieldInfo) + { +#if SIMPLE_JSON_NO_LINQ_EXPRESSION + return GetSetMethodByReflection(fieldInfo); +#else + return GetSetMethodByExpression(fieldInfo); +#endif + } + + public static SetDelegate GetSetMethodByReflection(PropertyInfo propertyInfo) + { + MethodInfo methodInfo = GetSetterMethodInfo(propertyInfo); + return delegate (object source, object value) { methodInfo.Invoke(source, new object[] { value }); }; + } + + public static SetDelegate GetSetMethodByReflection(FieldInfo fieldInfo) + { + return delegate (object source, object value) { fieldInfo.SetValue(source, value); }; + } + +#if !SIMPLE_JSON_NO_LINQ_EXPRESSION + + public static SetDelegate GetSetMethodByExpression(PropertyInfo propertyInfo) + { + MethodInfo setMethodInfo = GetSetterMethodInfo(propertyInfo); + ParameterExpression instance = Expression.Parameter(typeof(object), "instance"); + ParameterExpression value = Expression.Parameter(typeof(object), "value"); + UnaryExpression instanceCast = (!IsValueType(propertyInfo.DeclaringType)) ? Expression.TypeAs(instance, propertyInfo.DeclaringType) : Expression.Convert(instance, propertyInfo.DeclaringType); + UnaryExpression valueCast = (!IsValueType(propertyInfo.PropertyType)) ? Expression.TypeAs(value, propertyInfo.PropertyType) : Expression.Convert(value, propertyInfo.PropertyType); + Action compiled = Expression.Lambda>(Expression.Call(instanceCast, setMethodInfo, valueCast), new ParameterExpression[] { instance, value }).Compile(); + return delegate (object source, object val) { compiled(source, val); }; + } + + public static SetDelegate GetSetMethodByExpression(FieldInfo fieldInfo) + { + ParameterExpression instance = Expression.Parameter(typeof(object), "instance"); + ParameterExpression value = Expression.Parameter(typeof(object), "value"); + Action compiled = Expression.Lambda>( + Assign(Expression.Field(Expression.Convert(instance, fieldInfo.DeclaringType), fieldInfo), Expression.Convert(value, fieldInfo.FieldType)), instance, value).Compile(); + return delegate (object source, object val) { compiled(source, val); }; + } + + public static BinaryExpression Assign(Expression left, Expression right) + { +#if SIMPLE_JSON_TYPEINFO + return Expression.Assign(left, right); +#else + MethodInfo assign = typeof(Assigner<>).MakeGenericType(left.Type).GetMethod("Assign"); + BinaryExpression assignExpr = Expression.Add(left, right, assign); + return assignExpr; +#endif + } + + private static class Assigner + { + public static T Assign(ref T left, T right) + { + return (left = right); + } + } + +#endif + + public sealed class ThreadSafeDictionary : IDictionary + { + private readonly object _lock = new object(); + private readonly ThreadSafeDictionaryValueFactory _valueFactory; + private Dictionary _dictionary; + + public ThreadSafeDictionary(ThreadSafeDictionaryValueFactory valueFactory) + { + _valueFactory = valueFactory; + } + + private TValue Get(TKey key) + { + if (_dictionary == null) + return AddValue(key); + TValue value; + if (!_dictionary.TryGetValue(key, out value)) + return AddValue(key); + return value; + } + + private TValue AddValue(TKey key) + { + TValue value = _valueFactory(key); + lock (_lock) + { + if (_dictionary == null) + { + _dictionary = new Dictionary(); + _dictionary[key] = value; + } + else + { + TValue val; + if (_dictionary.TryGetValue(key, out val)) + return val; + Dictionary dict = new Dictionary(_dictionary); + dict[key] = value; + _dictionary = dict; + } + } + return value; + } + + public void Add(TKey key, TValue value) + { + throw new NotImplementedException(); + } + + public bool ContainsKey(TKey key) + { + return _dictionary.ContainsKey(key); + } + + public ICollection Keys + { + get { return _dictionary.Keys; } + } + + public bool Remove(TKey key) + { + throw new NotImplementedException(); + } + + public bool TryGetValue(TKey key, out TValue value) + { + value = this[key]; + return true; + } + + public ICollection Values + { + get { return _dictionary.Values; } + } + + public TValue this[TKey key] + { + get { return Get(key); } + set { throw new NotImplementedException(); } + } + + public void Add(KeyValuePair item) + { + throw new NotImplementedException(); + } + + public void Clear() + { + throw new NotImplementedException(); + } + + public bool Contains(KeyValuePair item) + { + throw new NotImplementedException(); + } + + public void CopyTo(KeyValuePair[] array, int arrayIndex) + { + throw new NotImplementedException(); + } + + public int Count + { + get { return _dictionary.Count; } + } + + public bool IsReadOnly + { + get { throw new NotImplementedException(); } + } + + public bool Remove(KeyValuePair item) + { + throw new NotImplementedException(); + } + + public IEnumerator> GetEnumerator() + { + return _dictionary.GetEnumerator(); + } + + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() + { + return _dictionary.GetEnumerator(); + } + } + + } + } +} +// ReSharper restore LoopCanBeConvertedToQuery +// ReSharper restore RedundantExplicitArrayCreation +// ReSharper restore SuggestUseVarKeywordEvident \ No newline at end of file diff --git a/src/WixToolset.Data/Library.cs b/src/WixToolset.Data/Library.cs index d82e64e0..13a670b0 100644 --- a/src/WixToolset.Data/Library.cs +++ b/src/WixToolset.Data/Library.cs @@ -15,6 +15,7 @@ namespace WixToolset.Data public const string XmlNamespaceUri = "http://wixtoolset.org/schemas/v4/wixlib"; private static readonly Version CurrentVersion = new Version("4.0.0.0"); +#if false private string id; private List embedFilePaths; private Dictionary localizations; @@ -186,7 +187,7 @@ namespace WixToolset.Data switch (reader.LocalName) { case "localization": - Localization localization = Localization.Read(reader, tableDefinitions); + Localization localization = Localization.Read(reader); library.localizations.Add(localization.Culture, localization); break; case "section": @@ -237,5 +238,6 @@ namespace WixToolset.Data writer.WriteEndElement(); } +#endif } } diff --git a/src/WixToolset.Data/Localization.cs b/src/WixToolset.Data/Localization.cs index 658ce14a..a5e2ba14 100644 --- a/src/WixToolset.Data/Localization.cs +++ b/src/WixToolset.Data/Localization.cs @@ -3,17 +3,10 @@ namespace WixToolset.Data { using System; - using System.Collections; using System.Collections.Generic; using System.Diagnostics; - using System.Diagnostics.CodeAnalysis; using System.Globalization; - using System.IO; - using System.Linq; - using System.Reflection; using System.Xml; - using System.Xml.Linq; - using System.Xml.Schema; using WixToolset.Data.Msi; using WixToolset.Data.Rows; @@ -24,17 +17,17 @@ namespace WixToolset.Data { private static string XmlElementName = "localization"; - private Dictionary variables = new Dictionary(); + private Dictionary variables = new Dictionary(); private Dictionary localizedControls = new Dictionary(); /// /// Instantiates a new localization object. /// - public Localization(int codepage, string culture, IDictionary variables, IDictionary localizedControls) + public Localization(int codepage, string culture, IDictionary variables, IDictionary localizedControls) { this.Codepage = codepage; this.Culture = String.IsNullOrEmpty(culture) ? String.Empty : culture.ToLowerInvariant(); - this.variables = new Dictionary(variables); + this.variables = new Dictionary(variables); this.localizedControls = new Dictionary(localizedControls); } @@ -54,19 +47,13 @@ namespace WixToolset.Data /// Gets the variables. /// /// The variables. - public ICollection Variables - { - get { return this.variables.Values; } - } + public ICollection Variables => this.variables.Values; /// /// Gets the localized controls. /// /// The localized controls. - public ICollection> LocalizedControls - { - get { return this.localizedControls; } - } + public ICollection> LocalizedControls => this.localizedControls; /// /// Merge the information from another localization object into this one. @@ -74,10 +61,9 @@ namespace WixToolset.Data /// The localization object to be merged into this one. public void Merge(Localization localization) { - foreach (WixVariableRow wixVariableRow in localization.Variables) + foreach (BindVariable wixVariableRow in localization.Variables) { - WixVariableRow existingWixVariableRow; - if (!this.variables.TryGetValue(wixVariableRow.Id, out existingWixVariableRow) || (existingWixVariableRow.Overridable && !wixVariableRow.Overridable)) + if (!this.variables.TryGetValue(wixVariableRow.Id, out BindVariable existingWixVariableRow) || (existingWixVariableRow.Overridable && !wixVariableRow.Overridable)) { variables[wixVariableRow.Id] = wixVariableRow; } @@ -94,7 +80,7 @@ namespace WixToolset.Data /// XmlReader where the intermediate is persisted. /// Collection containing TableDefinitions to use when loading the localization file. /// Returns the loaded localization. - internal static Localization Read(XmlReader reader, TableDefinitionCollection tableDefinitions) + internal static Localization Read(XmlReader reader) { Debug.Assert("localization" == reader.LocalName); @@ -115,8 +101,7 @@ namespace WixToolset.Data } } - TableDefinition wixVariableTable = tableDefinitions["WixVariable"]; - Dictionary variables = new Dictionary(); + Dictionary variables = new Dictionary(); Dictionary localizedControls = new Dictionary(); if (!empty) @@ -131,7 +116,7 @@ namespace WixToolset.Data switch (reader.LocalName) { case "string": - WixVariableRow row = Localization.ReadString(reader, wixVariableTable); + BindVariable row = Localization.ReadString(reader); variables.Add(row.Id, row); break; @@ -177,7 +162,7 @@ namespace WixToolset.Data writer.WriteAttributeString("culture", this.Culture); } - foreach (WixVariableRow wixVariableRow in this.variables.Values) + foreach (BindVariable wixVariableRow in this.variables.Values) { writer.WriteStartElement("string", Library.XmlNamespaceUri); @@ -265,7 +250,7 @@ namespace WixToolset.Data /// XmlReader where the intermediate is persisted. /// Collection containing TableDefinitions to use when loading the localization file. /// Returns the loaded localization. - private static WixVariableRow ReadString(XmlReader reader, TableDefinition wixVariableTable) + private static BindVariable ReadString(XmlReader reader) { Debug.Assert("string" == reader.LocalName); @@ -302,7 +287,8 @@ namespace WixToolset.Data } } - WixVariableRow wixVariableRow = new WixVariableRow(SourceLineNumber.CreateFromUri(reader.BaseURI), wixVariableTable); + BindVariable wixVariableRow = new BindVariable(); + wixVariableRow.SourceLineNumbers = SourceLineNumber.CreateFromUri(reader.BaseURI); wixVariableRow.Id = id; wixVariableRow.Overridable = overridable; wixVariableRow.Value = value; diff --git a/src/WixToolset.Data/Msi/MsiInterop.cs b/src/WixToolset.Data/Msi/MsiInterop.cs index 1a8ebbf0..e4dad358 100644 --- a/src/WixToolset.Data/Msi/MsiInterop.cs +++ b/src/WixToolset.Data/Msi/MsiInterop.cs @@ -2,25 +2,25 @@ namespace WixToolset.Data.Msi { - class MsiInterop + public class MsiInterop { // Patching constants internal const int MsiMaxStreamNameLength = 62; // http://msdn2.microsoft.com/library/aa370551.aspx // Component.Attributes - internal const int MsidbComponentAttributesLocalOnly = 0; - internal const int MsidbComponentAttributesSourceOnly = 1; - internal const int MsidbComponentAttributesOptional = 2; - internal const int MsidbComponentAttributesRegistryKeyPath = 4; - internal const int MsidbComponentAttributesSharedDllRefCount = 8; - internal const int MsidbComponentAttributesPermanent = 16; - internal const int MsidbComponentAttributesODBCDataSource = 32; - internal const int MsidbComponentAttributesTransitive = 64; - internal const int MsidbComponentAttributesNeverOverwrite = 128; - internal const int MsidbComponentAttributes64bit = 256; - internal const int MsidbComponentAttributesDisableRegistryReflection = 512; - internal const int MsidbComponentAttributesUninstallOnSupersedence = 1024; - internal const int MsidbComponentAttributesShared = 2048; + public const int MsidbComponentAttributesLocalOnly = 0; + public const int MsidbComponentAttributesSourceOnly = 1; + public const int MsidbComponentAttributesOptional = 2; + public const int MsidbComponentAttributesRegistryKeyPath = 4; + public const int MsidbComponentAttributesSharedDllRefCount = 8; + public const int MsidbComponentAttributesPermanent = 16; + public const int MsidbComponentAttributesODBCDataSource = 32; + public const int MsidbComponentAttributesTransitive = 64; + public const int MsidbComponentAttributesNeverOverwrite = 128; + public const int MsidbComponentAttributes64bit = 256; + public const int MsidbComponentAttributesDisableRegistryReflection = 512; + public const int MsidbComponentAttributesUninstallOnSupersedence = 1024; + public const int MsidbComponentAttributesShared = 2048; // BBControl.Attributes & Control.Attributes internal const int MsidbControlAttributesVisible = 0x00000001; @@ -141,14 +141,14 @@ namespace WixToolset.Data.Msi internal const int MsidbFeatureAttributesNoUnsupportedAdvertise = 32; // File.Attributes - internal const int MsidbFileAttributesReadOnly = 1; - internal const int MsidbFileAttributesHidden = 2; - internal const int MsidbFileAttributesSystem = 4; - internal const int MsidbFileAttributesVital = 512; - internal const int MsidbFileAttributesChecksum = 1024; - internal const int MsidbFileAttributesPatchAdded = 4096; - internal const int MsidbFileAttributesNoncompressed = 8192; - internal const int MsidbFileAttributesCompressed = 16384; + public const int MsidbFileAttributesReadOnly = 1; + public const int MsidbFileAttributesHidden = 2; + public const int MsidbFileAttributesSystem = 4; + public const int MsidbFileAttributesVital = 512; + public const int MsidbFileAttributesChecksum = 1024; + public const int MsidbFileAttributesPatchAdded = 4096; + public const int MsidbFileAttributesNoncompressed = 8192; + public const int MsidbFileAttributesCompressed = 16384; // IniFile.Action & RemoveIniFile.Action internal const int MsidbIniFileActionAddLine = 0; diff --git a/src/WixToolset.Data/NonClosingStreamWrapper.cs b/src/WixToolset.Data/NonClosingStreamWrapper.cs index 53d17d4d..a2d3be6a 100644 --- a/src/WixToolset.Data/NonClosingStreamWrapper.cs +++ b/src/WixToolset.Data/NonClosingStreamWrapper.cs @@ -18,88 +18,67 @@ namespace WixToolset.Data this.stream = stream; } - public override bool CanRead { get { return this.stream.CanRead; } } + public override bool CanRead => this.stream.CanRead; - public override bool CanSeek { get { return this.stream.CanSeek; } } + public override bool CanSeek => this.stream.CanSeek; - public override bool CanTimeout { get { return this.stream.CanTimeout; } } + public override bool CanTimeout => this.stream.CanTimeout; - public override bool CanWrite { get { return this.stream.CanWrite; } } + public override bool CanWrite => this.stream.CanWrite; - public override long Length { get { return this.stream.Length; } } + public override long Length => this.stream.Length; - public override long Position { get { return this.stream.Position; } set { this.stream.Position = value; } } - - public override int ReadTimeout { get { return this.stream.ReadTimeout; } set { this.stream.ReadTimeout = value; } } - - public override int WriteTimeout { get { return this.stream.WriteTimeout; } set { this.stream.WriteTimeout = value; } } - - public override IAsyncResult BeginRead(byte[] buffer, int offset, int count, AsyncCallback callback, object state) + public override long Position { - return this.stream.BeginRead(buffer, offset, count, callback, state); + get => this.stream.Position; + set => this.stream.Position = value; } - public override IAsyncResult BeginWrite(byte[] buffer, int offset, int count, AsyncCallback callback, object state) + public override int ReadTimeout { - return this.stream.BeginWrite(buffer, offset, count, callback, state); + get => this.stream.ReadTimeout; + set => this.stream.ReadTimeout = value; } - public override void Close() + public override int WriteTimeout { - // Do not pass through the call since this is what we are overriding. + get => this.stream.WriteTimeout; + set => this.stream.WriteTimeout = value; } - protected override void Dispose(bool disposing) - { - if (disposing) - { - this.stream.Flush(); - } - } + public override IAsyncResult BeginRead(byte[] buffer, int offset, int count, AsyncCallback callback, object state) => this.stream.BeginRead(buffer, offset, count, callback, state); - public override int EndRead(IAsyncResult asyncResult) - { - return this.stream.EndRead(asyncResult); - } + public override IAsyncResult BeginWrite(byte[] buffer, int offset, int count, AsyncCallback callback, object state) => this.stream.BeginWrite(buffer, offset, count, callback, state); - public override void EndWrite(IAsyncResult asyncResult) - { - this.stream.EndWrite(asyncResult); - } + public override int EndRead(IAsyncResult asyncResult) => this.stream.EndRead(asyncResult); - public override void Flush() - { - this.stream.Flush(); - } + public override void EndWrite(IAsyncResult asyncResult) => this.stream.EndWrite(asyncResult); - public override int Read(byte[] buffer, int offset, int count) - { - return this.stream.Read(buffer, offset, count); - } + public override void Flush() => this.stream.Flush(); - public override int ReadByte() - { - return this.stream.ReadByte(); - } + public override int Read(byte[] buffer, int offset, int count) => this.stream.Read(buffer, offset, count); - public override long Seek(long offset, SeekOrigin origin) - { - return this.stream.Seek(offset, origin); - } + public override int ReadByte() => this.stream.ReadByte(); - public override void SetLength(long value) - { - this.stream.SetLength(value); - } + public override long Seek(long offset, SeekOrigin origin) => this.stream.Seek(offset, origin); + + public override void SetLength(long value) => this.stream.SetLength(value); - public override void Write(byte[] buffer, int offset, int count) + public override void Write(byte[] buffer, int offset, int count) => this.stream.Write(buffer, offset, count); + + public override void WriteByte(byte value) => this.stream.WriteByte(value); + + public override void Close() { - this.stream.Write(buffer, offset, count); + // Do not pass through the call since this is what we are overriding. } - public override void WriteByte(byte value) + protected override void Dispose(bool disposing) { - this.stream.WriteByte(value); + if (disposing) + { + this.stream.Flush(); + } } } } diff --git a/src/WixToolset.Data/ObjectField.cs b/src/WixToolset.Data/ObjectField.cs deleted file mode 100644 index 42ef111b..00000000 --- a/src/WixToolset.Data/ObjectField.cs +++ /dev/null @@ -1,183 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Data -{ - using System; - using System.Diagnostics; - using System.Globalization; - using System.Xml; - - /// - /// Field containing data for an object column in a row. - /// - public sealed class ObjectField : Field - { - /// - /// Instantiates a new Field. - /// - /// Column definition for this field. - internal ObjectField(ColumnDefinition columnDefinition) : - base(columnDefinition) - { - } - - /// - /// Gets or sets the index of the embedded file in a library. - /// - /// The index of the embedded file. - public int? EmbeddedFileIndex { get; set; } - - /// - /// Gets or sets the previous index of the embedded file in the library. - /// - /// The previous index of the embedded file. - public int? PreviousEmbeddedFileIndex { get; set; } - - /// - /// Gets or sets the path to the embedded cabinet of the previous file. - /// - /// The path of the cabinet containing the previous file. - public Uri PreviousBaseUri { get; set; } - - /// - /// Gets the base URI of the object field. - /// - /// The base URI of the object field. - public Uri BaseUri { get; private set; } - - /// - /// Gets or sets the unresolved data for this field. - /// - /// Unresolved Data in the field. - public string UnresolvedData { get; set; } - - /// - /// Gets or sets the unresolved previous data. - /// - /// The unresolved previous data. - public string UnresolvedPreviousData { get; set; } - - /// - /// Parse a field from the xml. - /// - /// XmlReader where the intermediate is persisted. - internal override void Read(XmlReader reader) - { - Debug.Assert("field" == reader.LocalName); - - bool empty = reader.IsEmptyElement; - - this.BaseUri = new Uri(reader.BaseURI); - - while (reader.MoveToNextAttribute()) - { - switch (reader.LocalName) - { - case "cabinetFileId": - this.EmbeddedFileIndex = Convert.ToInt32(reader.Value); - break; - case "modified": - this.Modified = reader.Value.Equals("yes"); - break; - case "previousData": - this.PreviousData = reader.Value; - break; - case "unresolvedPreviousData": - this.UnresolvedPreviousData = reader.Value; - break; - case "unresolvedData": - this.UnresolvedData = reader.Value; - break; - case "previousCabinetFileId": - this.PreviousEmbeddedFileIndex = Convert.ToInt32(reader.Value); - break; - } - } - - if (!empty) - { - bool done = false; - - while (!done && reader.Read()) - { - switch (reader.NodeType) - { - case XmlNodeType.Element: - throw new XmlException(); - case XmlNodeType.CDATA: - case XmlNodeType.Text: - if (0 < reader.Value.Length) - { - this.Data = reader.Value; - } - break; - case XmlNodeType.EndElement: - done = true; - break; - } - } - - if (!done) - { - throw new XmlException(); - } - } - } - - /// - /// Persists a field in an XML format. - /// - /// XmlWriter where the Field should persist itself as XML. - internal override void Write(XmlWriter writer) - { - writer.WriteStartElement("field", Intermediate.XmlNamespaceUri); - - if (this.EmbeddedFileIndex.HasValue) - { - writer.WriteStartAttribute("cabinetFileId"); - writer.WriteValue(this.EmbeddedFileIndex); - writer.WriteEndAttribute(); - } - - if (this.Modified) - { - writer.WriteAttributeString("modified", "yes"); - } - - if (null != this.UnresolvedPreviousData) - { - writer.WriteAttributeString("unresolvedPreviousData", this.UnresolvedPreviousData); - } - - if (null != this.PreviousData) - { - writer.WriteAttributeString("previousData", this.PreviousData); - } - - if (null != this.UnresolvedData) - { - writer.WriteAttributeString("unresolvedData", this.UnresolvedData); - } - - if (this.PreviousEmbeddedFileIndex.HasValue) - { - writer.WriteStartAttribute("previousCabinetFileId"); - writer.WriteValue(this.PreviousEmbeddedFileIndex); - writer.WriteEndAttribute(); - } - - // Convert the data to a string that will persist nicely (nulls as String.Empty). - string text = Convert.ToString(this.Data, CultureInfo.InvariantCulture); - if (this.Column.UseCData) - { - writer.WriteCData(text); - } - else - { - writer.WriteString(text); - } - - writer.WriteEndElement(); - } - } -} diff --git a/src/WixToolset.Data/Output.cs b/src/WixToolset.Data/Output.cs deleted file mode 100644 index b2a21c6c..00000000 --- a/src/WixToolset.Data/Output.cs +++ /dev/null @@ -1,394 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Data -{ - using System; - using System.Collections.Generic; - using System.Globalization; - using System.IO; - using System.Linq; - using System.Xml; - - /// - /// Output is generated by the linker. - /// - public sealed class Output - { - public const string XmlNamespaceUri = "http://wixtoolset.org/schemas/v4/wixout"; - private static readonly Version CurrentVersion = new Version("4.0.0.0"); - - private Section entrySection; - - /// - /// Creates a new empty output object. - /// - /// The source line information for the output. - public Output(SourceLineNumber sourceLineNumbers) - { - this.Sections = new List
(); - this.SourceLineNumbers = sourceLineNumbers; - this.SubStorages = new List(); - this.Tables = new TableIndexedCollection(); - } - - /// - /// Gets the entry section for the output - /// - /// Entry section for the output. - public Section EntrySection - { - get - { - return this.entrySection; - } - - set - { - this.entrySection = value; - this.Codepage = value.Codepage; - - switch (this.entrySection.Type) - { - case SectionType.Bundle: - this.Type = OutputType.Bundle; - break; - case SectionType.Product: - this.Type = OutputType.Product; - break; - case SectionType.Module: - this.Type = OutputType.Module; - break; - case SectionType.PatchCreation: - this.Type = OutputType.PatchCreation; - break; - case SectionType.Patch: - this.Type = OutputType.Patch; - break; - default: - throw new InvalidOperationException(String.Format(CultureInfo.CurrentUICulture, WixDataStrings.EXP_UnexpectedEntrySectionType, this.entrySection.Type)); - } - } - } - - /// - /// Gets the type of the output. - /// - /// Type of the output. - public OutputType Type { get; set; } - - /// - /// Gets or sets the codepage for this output. - /// - /// Codepage of the output. - public int Codepage { get; set; } - - /// - /// Gets the sections contained in the output. - /// - /// Sections in the output. - public ICollection
Sections { get; private set; } - - /// - /// Gets the source line information for this output. - /// - /// The source line information for this output. - public SourceLineNumber SourceLineNumbers { get; private set; } - - /// - /// Gets the substorages in this output. - /// - /// The substorages in this output. - public ICollection SubStorages { get; private set; } - - /// - /// Gets the tables contained in this output. - /// - /// Collection of tables. - public TableIndexedCollection Tables { get; private set; } - - /// - /// Gets the output type corresponding to a given output filename extension. - /// - /// Case-insensitive output filename extension. - /// Output type for the extension. - public static OutputType GetOutputType(string extension) - { - if (extension.Equals(".exe", StringComparison.OrdinalIgnoreCase)) - { - return OutputType.Bundle; - } - if (extension.Equals(".msi", StringComparison.OrdinalIgnoreCase)) - { - return OutputType.Product; - } - else if (extension.Equals(".msm", StringComparison.OrdinalIgnoreCase)) - { - return OutputType.Module; - } - else if (extension.Equals(".msp", StringComparison.OrdinalIgnoreCase)) - { - return OutputType.Patch; - } - else if (extension.Equals(".mst", StringComparison.OrdinalIgnoreCase)) - { - return OutputType.Transform; - } - else if (extension.Equals(".pcp", StringComparison.OrdinalIgnoreCase)) - { - return OutputType.PatchCreation; - } - else - { - return OutputType.Unknown; - } - } - - /// - /// Gets the filename extension corresponding to a given output type. - /// - /// One of the WiX output types. - /// Filename extension for the output type, for example ".msi". - public static string GetExtension(OutputType type) - { - switch (type) - { - case OutputType.Bundle: - return ".exe"; - case OutputType.Product: - return ".msi"; - case OutputType.Module: - return ".msm"; - case OutputType.Patch: - return ".msp"; - case OutputType.Transform: - return ".mst"; - case OutputType.PatchCreation: - return ".pcp"; - default: - return ".wix"; - } - } - - /// - /// Loads an output from a path on disk. - /// - /// Path to output file saved on disk. - /// Suppresses wix.dll version mismatch check. - /// Output object. - public static Output Load(string path, bool suppressVersionCheck) - { - using (FileStream stream = File.OpenRead(path)) - using (FileStructure fs = FileStructure.Read(stream)) - { - if (FileFormat.Wixout != fs.FileFormat) - { - throw new WixUnexpectedFileFormatException(path, FileFormat.Wixout, fs.FileFormat); - } - - Uri uri = new Uri(Path.GetFullPath(path)); - using (XmlReader reader = XmlReader.Create(fs.GetDataStream(), null, uri.AbsoluteUri)) - { - try - { - reader.MoveToContent(); - return Output.Read(reader, suppressVersionCheck); - } - catch (XmlException xe) - { - throw new WixCorruptFileException(path, fs.FileFormat, xe); - } - } - } - } - - /// - /// Saves an output to a path on disk. - /// - /// Path to save output file to on disk. - public void Save(string path) - { - Directory.CreateDirectory(Path.GetDirectoryName(Path.GetFullPath(path))); - - using (FileStream stream = File.Create(path)) - using (FileStructure fs = FileStructure.Create(stream, FileFormat.Wixout, null)) - using (XmlWriter writer = XmlWriter.Create(fs.GetDataStream())) - { - writer.WriteStartDocument(); - this.Write(writer); - writer.WriteEndDocument(); - } - } - - /// - /// Processes an XmlReader and builds up the output object. - /// - /// Reader to get data from. - /// Suppresses wix.dll version mismatch check. - /// The Output represented by the Xml. - internal static Output Read(XmlReader reader, bool suppressVersionCheck) - { - if (!reader.LocalName.Equals("wixOutput")) - { - throw new XmlException(); - } - - bool empty = reader.IsEmptyElement; - Output output = new Output(SourceLineNumber.CreateFromUri(reader.BaseURI)); - SectionType sectionType = SectionType.Unknown; - Version version = null; - - while (reader.MoveToNextAttribute()) - { - switch (reader.LocalName) - { - case "codepage": - output.Codepage = Convert.ToInt32(reader.Value, CultureInfo.InvariantCulture.NumberFormat); - break; - case "type": - switch (reader.Value) - { - case "Bundle": - output.Type = OutputType.Bundle; - sectionType = SectionType.Bundle; - break; - case "Module": - output.Type = OutputType.Module; - sectionType = SectionType.Module; - break; - case "Patch": - output.Type = OutputType.Patch; - break; - case "PatchCreation": - output.Type = OutputType.PatchCreation; - sectionType = SectionType.PatchCreation; - break; - case "Product": - output.Type = OutputType.Product; - sectionType = SectionType.Product; - break; - case "Transform": - output.Type = OutputType.Transform; - break; - default: - throw new XmlException(); - } - break; - case "version": - version = new Version(reader.Value); - break; - } - } - - if (!suppressVersionCheck && null != version && !Output.CurrentVersion.Equals(version)) - { - throw new WixException(WixDataErrors.VersionMismatch(SourceLineNumber.CreateFromUri(reader.BaseURI), "wixOutput", version.ToString(), Output.CurrentVersion.ToString())); - } - - // create a section for all the rows to belong to - output.entrySection = new Section(null, sectionType, output.Codepage); - - // loop through the rest of the xml building up the Output object - TableDefinitionCollection tableDefinitions = null; - List tables = new List
(); - if (!empty) - { - bool done = false; - - // loop through all the fields in a row - while (!done && reader.Read()) - { - switch (reader.NodeType) - { - case XmlNodeType.Element: - switch (reader.LocalName) - { - case "subStorage": - output.SubStorages.Add(SubStorage.Read(reader)); - break; - case "table": - if (null == tableDefinitions) - { - throw new XmlException(); - } - tables.Add(Table.Read(reader, output.entrySection, tableDefinitions)); - break; - case "tableDefinitions": - tableDefinitions = TableDefinitionCollection.Read(reader); - break; - default: - throw new XmlException(); - } - break; - case XmlNodeType.EndElement: - done = true; - break; - } - } - - if (!done) - { - throw new XmlException(); - } - } - - output.Tables = new TableIndexedCollection(tables); - return output; - } - - /// - /// Ensure this output contains a particular table. - /// - /// Definition of the table that should exist. - /// Optional section to use for the table. If one is not provided, the entry section will be used. - /// The table in this output. - public Table EnsureTable(TableDefinition tableDefinition, Section section = null) - { - Table table; - if (!this.Tables.TryGetTable(tableDefinition.Name, out table)) - { - table = new Table(section ?? this.entrySection, tableDefinition); - this.Tables.Add(table); - } - - return table; - } - - /// - /// Persists an output in an XML format. - /// - /// XmlWriter where the Output should persist itself as XML. - internal void Write(XmlWriter writer) - { - writer.WriteStartElement("wixOutput", XmlNamespaceUri); - - writer.WriteAttributeString("type", this.Type.ToString()); - - if (0 != this.Codepage) - { - writer.WriteAttributeString("codepage", this.Codepage.ToString(CultureInfo.InvariantCulture)); - } - - writer.WriteAttributeString("version", Output.CurrentVersion.ToString()); - - // Collect all the table definitions and write them. - TableDefinitionCollection tableDefinitions = new TableDefinitionCollection(); - foreach (Table table in this.Tables) - { - tableDefinitions.Add(table.Definition); - } - tableDefinitions.Write(writer); - - foreach (Table table in this.Tables.OrderBy(t => t.Name)) - { - table.Write(writer); - } - - foreach (SubStorage subStorage in this.SubStorages) - { - subStorage.Write(writer); - } - - writer.WriteEndElement(); - } - } -} diff --git a/src/WixToolset.Data/Pdb.cs b/src/WixToolset.Data/Pdb.cs deleted file mode 100644 index 03c3ddbb..00000000 --- a/src/WixToolset.Data/Pdb.cs +++ /dev/null @@ -1,163 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Data -{ - using System; - using System.IO; - using System.Xml; - - /// - /// Pdb generated by the binder. - /// - public sealed class Pdb - { - public const string XmlNamespaceUri = "http://wixtoolset.org/schemas/v4/wixpdb"; - private static readonly Version CurrentVersion = new Version("4.0.0.0"); - - /// - /// Creates a new empty pdb object. - /// - /// The source line information for the pdb. - public Pdb() - { - } - - /// - /// Gets or sets the output that is a part of this pdb. - /// - /// Type of the output. - public Output Output { get; set; } - - /// - /// Loads a pdb from a path on disk. - /// - /// Path to pdb file saved on disk. - /// Suppresses wix.dll version mismatch check. - /// Pdb pdb. - public static Pdb Load(string path, bool suppressVersionCheck) - { - using (FileStream stream = File.OpenRead(path)) - using (FileStructure fs = FileStructure.Read(stream)) - { - if (FileFormat.Wixpdb != fs.FileFormat) - { - throw new WixUnexpectedFileFormatException(path, FileFormat.Wixpdb, fs.FileFormat); - } - - Uri uri = new Uri(Path.GetFullPath(path)); - using (XmlReader reader = XmlReader.Create(fs.GetDataStream(), null, uri.AbsoluteUri)) - { - try - { - reader.MoveToContent(); - return Pdb.Read(reader, suppressVersionCheck); - } - catch (XmlException xe) - { - throw new WixCorruptFileException(path, fs.FileFormat, xe); - } - } - } - } - - /// - /// Saves a pdb to a path on disk. - /// - /// Path to save pdb file to on disk. - public void Save(string path) - { - Directory.CreateDirectory(Path.GetDirectoryName(Path.GetFullPath(path))); - - using (FileStream stream = File.Create(path)) - using (FileStructure fs = FileStructure.Create(stream, FileFormat.Wixpdb, null)) - using (XmlWriter writer = XmlWriter.Create(fs.GetDataStream())) - { - writer.WriteStartDocument(); - this.Write(writer); - writer.WriteEndDocument(); - } - } - - /// - /// Processes an XmlReader and builds up the pdb object. - /// - /// Reader to get data from. - /// Suppresses wix.dll version mismatch check. - /// The Pdb represented by the Xml. - internal static Pdb Read(XmlReader reader, bool suppressVersionCheck) - { - if ("wixPdb" != reader.LocalName) - { - throw new XmlException(); - } - - bool empty = reader.IsEmptyElement; - Pdb pdb = new Pdb(); - Version version = null; - - while (reader.MoveToNextAttribute()) - { - switch (reader.LocalName) - { - case "version": - version = new Version(reader.Value); - break; - } - } - - if (!suppressVersionCheck && null != version && !Pdb.CurrentVersion.Equals(version)) - { - throw new WixException(WixDataErrors.VersionMismatch(SourceLineNumber.CreateFromUri(reader.BaseURI), "wixPdb", version.ToString(), Pdb.CurrentVersion.ToString())); - } - - // loop through the rest of the pdb building up the Output object - if (!empty) - { - bool done = false; - - // loop through all the fields in a row - while (!done && reader.Read()) - { - switch (reader.NodeType) - { - case XmlNodeType.Element: - switch (reader.LocalName) - { - case "wixOutput": - pdb.Output = Output.Read(reader, suppressVersionCheck); - break; - default: - throw new XmlException(); - } - break; - case XmlNodeType.EndElement: - done = true; - break; - } - } - - if (!done) - { - throw new XmlException(); - } - } - - return pdb; - } - - /// - /// Persists a pdb in an XML format. - /// - /// XmlWriter where the Pdb should persist itself as XML. - internal void Write(XmlWriter writer) - { - writer.WriteStartElement("wixPdb", XmlNamespaceUri); - - writer.WriteAttributeString("version", Pdb.CurrentVersion.ToString()); - - this.Output.Write(writer); - - writer.WriteEndElement(); - } - } -} diff --git a/src/WixToolset.Data/Row.cs b/src/WixToolset.Data/Row.cs deleted file mode 100644 index 4ebddc06..00000000 --- a/src/WixToolset.Data/Row.cs +++ /dev/null @@ -1,626 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Data -{ - using System; - using System.Collections.Generic; - using System.Diagnostics; - using System.Diagnostics.CodeAnalysis; - using System.Globalization; - using System.Text; - using System.Text.RegularExpressions; - using System.Xml; - - /// - /// Row containing data for a table. - /// - public class Row - { - private static long rowCount; - - private Field[] fields; - - /// - /// Creates a row that belongs to a table. - /// - /// Original source lines for this row. - /// Table this row belongs to and should get its column definitions from. - /// The compiler should use this constructor exclusively. - public Row(SourceLineNumber sourceLineNumbers, Table table) - : this(sourceLineNumbers, table.Definition) - { - this.Table = table; - } - - /// - /// Creates a row that does not belong to a table. - /// - /// Original source lines for this row. - /// TableDefinition this row should get its column definitions from. - /// This constructor is used in cases where there isn't a clear owner of the row. The linker uses this constructor for the rows it generates. - public Row(SourceLineNumber sourceLineNumbers, TableDefinition tableDefinition) - { - this.Number = rowCount++; - this.SourceLineNumbers = sourceLineNumbers; - this.fields = new Field[tableDefinition.Columns.Count]; - this.TableDefinition = tableDefinition; - - for (int i = 0; i < this.fields.Length; ++i) - { - this.fields[i] = Field.Create(this.TableDefinition.Columns[i]); - } - } - - /// - /// Creates a shallow copy of a row from another row. - /// - /// The row the data is copied from. - protected Row(Row source) - { - this.Table = source.Table; - this.TableDefinition = source.TableDefinition; - this.Number = source.Number; - this.Access = source.Access; - this.Operation = source.Operation; - this.Redundant = source.Redundant; - this.SectionId = source.SectionId; - this.SourceLineNumbers = source.SourceLineNumbers; - this.fields = source.fields; - } - - /// - /// Gets or sets the access to the row's primary key. - /// - /// The row access modifier. - public AccessModifier Access { get; set; } - - /// - /// Gets or sets the row transform operation. - /// - /// The row transform operation. - public RowOperation Operation { get; set; } - - /// - /// Gets or sets wether the row is a duplicate of another row thus redundant. - /// - public bool Redundant { get; set; } - - /// - /// Gets the section for the row. - /// - /// Section for the row. - public Section Section { get { return (null == this.Table) ? null : this.Table.Section; } } - - /// - /// Gets or sets the SectionId property on the row. - /// - /// The SectionId property on the row. - public string SectionId { get; set; } - - /// - /// Gets the source file and line number for the row. - /// - /// Source file and line number. - public SourceLineNumber SourceLineNumbers { get; private set; } - - /// - /// Gets the table this row belongs to. - /// - /// null if Row does not belong to a Table, or owner Table otherwise. - public Table Table { get; private set; } - - /// - /// Gets the table definition for this row. - /// - /// A Row always has a TableDefinition, even if the Row does not belong to a Table. - /// TableDefinition for Row. - public TableDefinition TableDefinition { get; private set; } - - /// - /// Gets the fields contained by this row. - /// - /// Array of field objects - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")] - public Field[] Fields - { - get { return this.fields; } - } - - /// - /// Gets the unique number for the row. - /// - /// Number for row. - public long Number { get; private set; } - - /// - /// Gets or sets the value of a particular field in the row. - /// - /// field index. - /// Value of a field in the row. - public object this[int field] - { - get { return this.fields[field].Data; } - set { this.fields[field].Data = value; } - } - - /// - /// Gets the field as an integer. - /// - /// Field's data as an integer. - public int FieldAsInteger(int field) - { - return this.fields[field].AsInteger(); - } - - /// - /// Gets the field as an integer that could be null. - /// - /// Field's data as an integer that could be null. - public int? FieldAsNullableInteger(int field) - { - return this.fields[field].AsNullableInteger(); - } - - /// - /// Gets the field as a string. - /// - /// Field's data as a string. - public string FieldAsString(int field) - { - return this.fields[field].AsString(); - } - - /// - /// Sets the value of a particular field in the row without validating. - /// - /// field index. - /// Value of a field in the row. - /// True if successful, false if validation failed. - public bool BestEffortSetField(int field, object value) - { - return this.fields[field].BestEffortSet(value); - } - - /// - /// Get the value used to represent the row in a keyed row collection. - /// - /// Primary key or row number if no primary key is available. - public string GetKey() - { - return this.GetPrimaryKey() ?? Convert.ToString(this.Number, CultureInfo.InvariantCulture); - } - - /// - /// Get the primary key of this row. - /// - /// Delimiter character for multiple column primary keys. - /// The primary key or null if the row's table has no primary key columns. - public string GetPrimaryKey(char delimiter = '/') - { - return this.GetPrimaryKey(delimiter, String.Empty); - } - - /// - /// Get the primary key of this row. - /// - /// Delimiter character for multiple column primary keys. - /// String to represent null values in the primary key. - /// The primary key or null if the row's table has no primary key columns. - public string GetPrimaryKey(char delimiter, string nullReplacement) - { - bool foundPrimaryKey = false; - StringBuilder primaryKey = new StringBuilder(); - - foreach (Field field in this.fields) - { - if (field.Column.PrimaryKey) - { - if (foundPrimaryKey) - { - primaryKey.Append(delimiter); - } - - primaryKey.Append((null == field.Data) ? nullReplacement : Convert.ToString(field.Data, CultureInfo.InvariantCulture)); - - foundPrimaryKey = true; - } - else // primary keys must be the first columns of a row so the first non-primary key means we can stop looking. - { - break; - } - } - - return foundPrimaryKey ? primaryKey.ToString() : null; - } - - /// - /// Returns true if the specified field is null or an empty string. - /// - /// Index of the field to check. - /// true if the specified field is null or an empty string, false otherwise. - public bool IsColumnEmpty(int field) - { - if (null == this.fields[field].Data) - { - return true; - } - - string dataString = this.fields[field].Data as string; - if (null != dataString && 0 == dataString.Length) - { - return true; - } - - return false; - } - - /// - /// Tests if the passed in row is identical. - /// - /// Row to compare against. - /// True if two rows are identical. - public bool IsIdentical(Row row) - { - bool identical = (this.TableDefinition.Name == row.TableDefinition.Name && this.fields.Length == row.fields.Length); - - for (int i = 0; identical && i < this.fields.Length; ++i) - { - if (!(this.fields[i].IsIdentical(row.fields[i]))) - { - identical = false; - } - } - - return identical; - } - - /// - /// Returns a string representation of the Row. - /// - /// A string representation of the Row. - public override string ToString() - { - return String.Join("/", (object[])this.fields); - } - - /// - /// Creates a Row from the XmlReader. - /// - /// Reader to get data from. - /// Table for this row. - /// New row object. - internal static Row Read(XmlReader reader, Table table) - { - Debug.Assert("row" == reader.LocalName); - - bool empty = reader.IsEmptyElement; - AccessModifier access = AccessModifier.Public; - RowOperation operation = RowOperation.None; - bool redundant = false; - string sectionId = null; - SourceLineNumber sourceLineNumbers = null; - - while (reader.MoveToNextAttribute()) - { - switch (reader.LocalName) - { - case "access": - access = (AccessModifier)Enum.Parse(typeof(AccessModifier), reader.Value, true); - break; - case "op": - operation = (RowOperation)Enum.Parse(typeof(RowOperation), reader.Value, true); - break; - case "redundant": - redundant = reader.Value.Equals("yes"); - break; - case "sectionId": - sectionId = reader.Value; - break; - case "sourceLineNumber": - sourceLineNumbers = SourceLineNumber.CreateFromEncoded(reader.Value); - break; - } - } - - Row row = table.CreateRow(sourceLineNumbers); - row.Access = access; - row.Operation = operation; - row.Redundant = redundant; - row.SectionId = sectionId; - - // loop through all the fields in a row - if (!empty) - { - bool done = false; - int field = 0; - - // loop through all the fields in a row - while (!done && reader.Read()) - { - switch (reader.NodeType) - { - case XmlNodeType.Element: - switch (reader.LocalName) - { - case "field": - if (row.Fields.Length <= field) - { - if (!reader.IsEmptyElement) - { - throw new XmlException(); - } - } - else - { - row.fields[field].Read(reader); - } - ++field; - break; - default: - throw new XmlException(); - } - break; - case XmlNodeType.EndElement: - done = true; - break; - } - } - - if (!done) - { - throw new XmlException(); - } - } - - return row; - } - - /// - /// Returns the row in a format usable in IDT files. - /// - /// Whether to keep columns added in a transform. - /// String with tab delimited field values. - internal string ToIdtDefinition(bool keepAddedColumns) - { - bool first = true; - StringBuilder sb = new StringBuilder(); - - foreach (Field field in this.fields) - { - // Conditionally keep columns added in a transform; otherwise, - // break because columns can only be added at the end. - if (field.Column.Added && !keepAddedColumns) - { - break; - } - - if (first) - { - first = false; - } - else - { - sb.Append('\t'); - } - - sb.Append(field.ToIdtValue()); - } - sb.Append("\r\n"); - - return sb.ToString(); - } - - /// - /// Gets the modularized version of the field data. - /// - /// The field to modularize. - /// String containing the GUID of the Merge Module to append the the field value, if appropriate. - /// Optional collection of identifiers that should not be modularized. - /// moduleGuid is expected to be null when not being used to compile a Merge Module. - /// The modularized version of the field data. - internal string GetModularizedValue(Field field, string modularizationGuid, ISet suppressModularizationIdentifiers) - { - Debug.Assert(null != field.Data && 0 < ((string)field.Data).Length); - string fieldData = Convert.ToString(field.Data, CultureInfo.InvariantCulture); - - if (null != modularizationGuid && ColumnModularizeType.None != field.Column.ModularizeType && !(WindowsInstallerStandard.IsStandardAction(fieldData) || WindowsInstallerStandard.IsStandardProperty(fieldData))) - { - StringBuilder sb; - int start; - ColumnModularizeType modularizeType = field.Column.ModularizeType; - - // special logic for the ControlEvent table's Argument column - // this column requires different modularization methods depending upon the value of the Event column - if (ColumnModularizeType.ControlEventArgument == field.Column.ModularizeType) - { - switch (this[2].ToString()) - { - case "CheckExistingTargetPath": // redirectable property name - case "CheckTargetPath": - case "DoAction": // custom action name - case "NewDialog": // dialog name - case "SelectionBrowse": - case "SetTargetPath": - case "SpawnDialog": - case "SpawnWaitDialog": - if (Common.IsIdentifier(fieldData)) - { - modularizeType = ColumnModularizeType.Column; - } - else - { - modularizeType = ColumnModularizeType.Property; - } - break; - default: // formatted - modularizeType = ColumnModularizeType.Property; - break; - } - } - else if (ColumnModularizeType.ControlText == field.Column.ModularizeType) - { - // icons are stored in the Binary table, so they get column-type modularization - if (("Bitmap" == this[2].ToString() || "Icon" == this[2].ToString()) && Common.IsIdentifier(fieldData)) - { - modularizeType = ColumnModularizeType.Column; - } - else - { - modularizeType = ColumnModularizeType.Property; - } - } - - switch (modularizeType) - { - case ColumnModularizeType.Column: - // ensure the value is an identifier (otherwise it shouldn't be modularized this way) - if (!Common.IsIdentifier(fieldData)) - { - throw new InvalidOperationException(String.Format(CultureInfo.CurrentUICulture, WixDataStrings.EXP_CannotModularizeIllegalID, fieldData)); - } - - // if we're not supposed to suppress modularization of this identifier - if (null == suppressModularizationIdentifiers || !suppressModularizationIdentifiers.Contains(fieldData)) - { - fieldData = String.Concat(fieldData, ".", modularizationGuid); - } - break; - - case ColumnModularizeType.Property: - case ColumnModularizeType.Condition: - Regex regex; - if (ColumnModularizeType.Property == modularizeType) - { - regex = new Regex(@"\[(?[#$!]?[a-zA-Z_][a-zA-Z0-9_\.]*)]", RegexOptions.Singleline | RegexOptions.ExplicitCapture); - } - else - { - Debug.Assert(ColumnModularizeType.Condition == modularizeType); - - // This heinous looking regular expression is actually quite an elegant way - // to shred the entire condition into the identifiers that need to be - // modularized. Let's break it down piece by piece: - // - // 1. Look for the operators: NOT, EQV, XOR, OR, AND, IMP (plus a space). Note that the - // regular expression is case insensitive so we don't have to worry about - // all the permutations of these strings. - // 2. Look for quoted strings. Quoted strings are just text and are ignored - // outright. - // 3. Look for environment variables. These look like identifiers we might - // otherwise be interested in but start with a percent sign. Like quoted - // strings these enviroment variable references are ignored outright. - // 4. Match all identifiers that are things that need to be modularized. Note - // the special characters (!, $, ?, &) that denote Component and Feature states. - regex = new Regex(@"NOT\s|EQV\s|XOR\s|OR\s|AND\s|IMP\s|"".*?""|%[a-zA-Z_][a-zA-Z0-9_\.]*|(?[!$\?&]?[a-zA-Z_][a-zA-Z0-9_\.]*)", RegexOptions.Singleline | RegexOptions.IgnoreCase | RegexOptions.ExplicitCapture); - - // less performant version of the above with captures showing where everything lives - // regex = new Regex(@"(?NOT|EQV|XOR|OR|AND|IMP)|(?"".*?"")|(?%[a-zA-Z_][a-zA-Z0-9_\.]*)|(?[!$\?&]?[a-zA-Z_][a-zA-Z0-9_\.]*)",RegexOptions.Singleline | RegexOptions.IgnoreCase | RegexOptions.ExplicitCapture); - } - - MatchCollection matches = regex.Matches(fieldData); - - sb = new StringBuilder(fieldData); - - // notice how this code walks backward through the list - // because it modifies the string as we through it - for (int i = matches.Count - 1; 0 <= i; i--) - { - Group group = matches[i].Groups["identifier"]; - if (group.Success) - { - string identifier = group.Value; - if (!WindowsInstallerStandard.IsStandardProperty(identifier) && (null == suppressModularizationIdentifiers || !suppressModularizationIdentifiers.Contains(identifier))) - { - sb.Insert(group.Index + group.Length, '.'); - sb.Insert(group.Index + group.Length + 1, modularizationGuid); - } - } - } - - fieldData = sb.ToString(); - break; - - case ColumnModularizeType.CompanionFile: - // if we're not supposed to ignore this identifier and the value does not start with - // a digit, we must have a companion file so modularize it - if ((null == suppressModularizationIdentifiers || !suppressModularizationIdentifiers.Contains(fieldData)) && - 0 < fieldData.Length && !Char.IsDigit(fieldData, 0)) - { - fieldData = String.Concat(fieldData, ".", modularizationGuid); - } - break; - - case ColumnModularizeType.Icon: - if (null == suppressModularizationIdentifiers || !suppressModularizationIdentifiers.Contains(fieldData)) - { - start = fieldData.LastIndexOf(".", StringComparison.Ordinal); - if (-1 == start) - { - fieldData = String.Concat(fieldData, ".", modularizationGuid); - } - else - { - fieldData = String.Concat(fieldData.Substring(0, start), ".", modularizationGuid, fieldData.Substring(start)); - } - } - break; - - case ColumnModularizeType.SemicolonDelimited: - string[] keys = fieldData.Split(';'); - for (int i = 0; i < keys.Length; ++i) - { - keys[i] = String.Concat(keys[i], ".", modularizationGuid); - } - fieldData = String.Join(";", keys); - break; - } - } - - return fieldData; - } - - /// - /// Persists a row in an XML format. - /// - /// XmlWriter where the Row should persist itself as XML. - [SuppressMessage("Microsoft.Globalization", "CA1308:NormalizeStringsToUppercase", Justification = "Changing the way this string normalizes would result " + - "in a change to the way intermediate files are generated, potentially causing extra churn in patches on an MSI built from an older version of WiX. " + - "Furthermore, there is no security hole here, as the strings won't need to make a round trip")] - internal void Write(XmlWriter writer) - { - writer.WriteStartElement("row", Intermediate.XmlNamespaceUri); - - if (AccessModifier.Public != this.Access) - { - writer.WriteAttributeString("access", this.Access.ToString().ToLowerInvariant()); - } - - if (RowOperation.None != this.Operation) - { - writer.WriteAttributeString("op", this.Operation.ToString().ToLowerInvariant()); - } - - if (this.Redundant) - { - writer.WriteAttributeString("redundant", "yes"); - } - - if (null != this.SectionId) - { - writer.WriteAttributeString("sectionId", this.SectionId); - } - - if (null != this.SourceLineNumbers) - { - writer.WriteAttributeString("sourceLineNumber", this.SourceLineNumbers.GetEncoded()); - } - - for (int i = 0; i < this.fields.Length; ++i) - { - this.fields[i].Write(writer); - } - - writer.WriteEndElement(); - } - } -} diff --git a/src/WixToolset.Data/RowDictionary.cs b/src/WixToolset.Data/RowDictionary.cs deleted file mode 100644 index a0cc5302..00000000 --- a/src/WixToolset.Data/RowDictionary.cs +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Data -{ - using System; - using System.Collections.Generic; - - /// - /// A dictionary of rows. Unlike the this - /// will throw when multiple rows with the same key are added. - /// - public sealed class RowDictionary : Dictionary where T : Row - { - /// - /// Creates an empty . - /// - public RowDictionary() - : base(StringComparer.InvariantCulture) - { - } - - /// - /// Creates and populates a with the rows from the given enumerator. - /// - /// Rows to add. - public RowDictionary(IEnumerable rows) - : this() - { - foreach (T row in rows) - { - this.Add(row); - } - } - - /// - /// Creates and populates a with the rows from the given . - /// - /// The table to index. - /// - /// Rows added to the index are not automatically added to the given . - /// - public RowDictionary(Table table) - : this() - { - if (null != table) - { - foreach (T row in table.Rows) - { - this.Add(row); - } - } - } - - /// - /// Adds a row to the dictionary using the row key. - /// - /// Row to add to the dictionary. - public void Add(T row) - { - this.Add(row.GetKey(), row); - } - - /// - /// Gets the row by integer key. - /// - /// Integer key to look up. - /// Row or null if key is not found. - public T Get(int key) - { - return this.Get(key.ToString()); - } - - /// - /// Gets the row by string key. - /// - /// String key to look up. - /// Row or null if key is not found. - public T Get(string key) - { - T result; - return this.TryGetValue(key, out result) ? result : null; - } - } -} diff --git a/src/WixToolset.Data/RowIndexedList.cs b/src/WixToolset.Data/RowIndexedList.cs deleted file mode 100644 index 27c43a81..00000000 --- a/src/WixToolset.Data/RowIndexedList.cs +++ /dev/null @@ -1,301 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Data -{ - using System; - using System.Collections.Generic; - - /// - /// A list of rows indexed by their primary key. Unlike a - /// this indexed list will track rows in their added order and will allow rows with - /// duplicate keys to be added to the list, although only the first row will be indexed. - /// - public sealed class RowIndexedList : IList where T : Row - { - private Dictionary index; - private List rows; - private List duplicates; - - /// - /// Creates an empty . - /// - public RowIndexedList() - { - this.index = new Dictionary(StringComparer.InvariantCulture); - this.rows = new List(); - this.duplicates = new List(); - } - - /// - /// Creates and populates a with the rows from the given enumerator. - /// - /// Rows to index. - public RowIndexedList(IEnumerable rows) - : this() - { - foreach (T row in rows) - { - this.Add(row); - } - } - - /// - /// Creates and populates a with the rows from the given . - /// - /// The table to index. - /// - /// Rows added to the index are not automatically added to the given . - /// - public RowIndexedList(Table table) - : this() - { - if (null != table) - { - foreach (T row in table.Rows) - { - this.Add(row); - } - } - } - - /// - /// Gets the duplicates in the list. - /// - public IEnumerable Duplicates { get { return this.duplicates; } } - - /// - /// Gets the row by integer key. - /// - /// Integer key to look up. - /// Row or null if key is not found. - public T Get(int key) - { - return this.Get(key.ToString()); - } - - /// - /// Gets the row by string key. - /// - /// String key to look up. - /// Row or null if key is not found. - public T Get(string key) - { - T result; - return this.TryGet(key, out result) ? result : null; - } - - /// - /// Gets the row by string key if it exists. - /// - /// Key of row to get. - /// Row found. - /// True if key was found otherwise false. - public bool TryGet(string key, out T row) - { - return this.index.TryGetValue(key, out row); - } - - /// - /// Tries to add a row as long as it would not create a duplicate. - /// - /// Row to add. - /// True if the row as added otherwise false. - public bool TryAdd(T row) - { - try - { - this.index.Add(row.GetKey(), row); - } - catch (ArgumentException) // if the key already exists, bail. - { - return false; - } - - this.rows.Add(row); - return true; - } - - /// - /// Adds a row to the list. If a row with the same key is already index, the row is - /// is not in the index but will still be part of the list and added to the duplicates - /// list. - /// - /// - public void Add(T row) - { - this.rows.Add(row); - try - { - this.index.Add(row.GetKey(), row); - } - catch (ArgumentException) // if the key already exists, we have a duplicate. - { - this.duplicates.Add(row); - } - } - - /// - /// Gets the index of a row. - /// - /// Iterates through the list of rows to find the index of a particular row. - /// Index of row or -1 if not found. - public int IndexOf(T row) - { - return this.rows.IndexOf(row); - } - - /// - /// Inserts a row at a particular index of the list. - /// - /// Index to insert the row after. - /// Row to insert. - public void Insert(int index, T row) - { - this.rows.Insert(index, row); - try - { - this.index.Add(row.GetKey(), row); - } - catch (ArgumentException) // if the key already exists, we have a duplicate. - { - this.duplicates.Add(row); - } - } - - /// - /// Removes a row from a particular index. - /// - /// Index to remove the row at. - public void RemoveAt(int index) - { - T row = this.rows[index]; - - this.rows.RemoveAt(index); - - T indexRow; - if (this.index.TryGetValue(row.GetKey(), out indexRow) && indexRow == row) - { - this.index.Remove(row.GetKey()); - } - else // only try to remove from duplicates if the row was not indexed (if it was indexed, it wasn't a dupe). - { - this.duplicates.Remove(row); - } - } - - /// - /// Gets or sets a row at the specified index. - /// - /// Index to get the row. - /// Row at specified index. - public T this[int index] - { - get - { - return this.rows[index]; - } - set - { - this.rows[index] = value; - try - { - this.index.Add(value.GetKey(), value); - } - catch (ArgumentException) // if the key already exists, we have a duplicate. - { - this.duplicates.Add(value); - } - } - } - - /// - /// Empties the list and it's index. - /// - public void Clear() - { - this.index.Clear(); - this.rows.Clear(); - this.duplicates.Clear(); - } - - /// - /// Searches the list for a row without using the index. - /// - /// Row to look for in the list. - /// True if the row is in the list, otherwise false. - public bool Contains(T row) - { - return this.rows.Contains(row); - } - - /// - /// Copies the rows of the list to an array. - /// - /// Array to copy the list into. - /// Index to start copying at. - public void CopyTo(T[] array, int arrayIndex) - { - this.rows.CopyTo(array, arrayIndex); - } - - /// - /// Number of rows in the list. - /// - public int Count - { - get { return this.rows.Count; } - } - - /// - /// Indicates whether the list is read-only. Always false. - /// - public bool IsReadOnly - { - get { return false; } - } - - /// - /// Removes a row from the list. Indexed rows will be removed but the colleciton will NOT - /// promote duplicates to the index automatically. The duplicate would also need to be removed - /// and re-added to be indexed. - /// - /// - /// - public bool Remove(T row) - { - bool removed = this.rows.Remove(row); - if (removed) - { - T indexRow; - if (this.index.TryGetValue(row.GetKey(), out indexRow) && indexRow == row) - { - this.index.Remove(row.GetKey()); - } - else // only try to remove from duplicates if the row was not indexed (if it was indexed, it wasn't a dupe). - { - this.duplicates.Remove(row); - } - } - - return removed; - } - - /// - /// Gets an enumerator over the whole list. - /// - /// List enumerator. - public IEnumerator GetEnumerator() - { - return this.rows.GetEnumerator(); - } - - /// - /// Gets an untyped enumerator over the whole list. - /// - /// Untyped list enumerator. - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() - { - return this.rows.GetEnumerator(); - } - } -} diff --git a/src/WixToolset.Data/RowOperation.cs b/src/WixToolset.Data/RowOperation.cs deleted file mode 100644 index 30dadd4e..00000000 --- a/src/WixToolset.Data/RowOperation.cs +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Data -{ - /// - /// The row transform operations. - /// - public enum RowOperation - { - /// - /// No operation. - /// - None, - - /// - /// Added row. - /// - Add, - - /// - /// Deleted row. - /// - Delete, - - /// - /// Modified row. - /// - Modify - } -} diff --git a/src/WixToolset.Data/Rows/BBControlRow.cs b/src/WixToolset.Data/Rows/BBControlRow.cs deleted file mode 100644 index d0f08662..00000000 --- a/src/WixToolset.Data/Rows/BBControlRow.cs +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Data.Rows -{ - using System.Diagnostics.CodeAnalysis; - - /// - /// Specialization of a row for the Control table. - /// - public sealed class BBControlRow : Row - { - /// - /// Creates a Control row that belongs to a table. - /// - /// Original source lines for this row. - /// Table this Control row belongs to and should get its column definitions from. - public BBControlRow(SourceLineNumber sourceLineNumbers, Table table) : - base(sourceLineNumbers, table) - { - } - - /// - /// Gets or sets the dialog of the Control row. - /// - /// Primary key of the Control row. - public string Billboard - { - get { return (string)this.Fields[0].Data; } - set { this.Fields[0].Data = value; } - } - - /// - /// Gets or sets the identifier for this Control row. - /// - /// Identifier for this Control row. - public string BBControl - { - get { return (string)this.Fields[1].Data; } - set { this.Fields[1].Data = value; } - } - - /// - /// Gets or sets the type of the BBControl. - /// - /// Name of the BBControl. - [SuppressMessage("Microsoft.Naming", "CA1721:PropertyNamesShouldNotMatchGetMethods")] - public string Type - { - get { return this.Fields[2].AsString(); } - set { this.Fields[2].Data = value; } - } - - /// - /// Gets or sets the X location of the BBControl. - /// - /// X location of the BBControl. - public string X - { - get { return this.Fields[3].AsString(); } - set { this.Fields[3].Data = value; } - } - - /// - /// Gets or sets the Y location of the BBControl. - /// - /// Y location of the BBControl. - public string Y - { - get { return this.Fields[4].AsString(); } - set { this.Fields[4].Data = value; } - } - - /// - /// Gets or sets the width of the BBControl. - /// - /// Width of the BBControl. - public string Width - { - get { return this.Fields[5].AsString(); } - set { this.Fields[5].Data = value; } - } - - /// - /// Gets or sets the height of the BBControl. - /// - /// Height of the BBControl. - public string Height - { - get { return this.Fields[6].AsString(); } - set { this.Fields[6].Data = value; } - } - - /// - /// Gets or sets the attributes for the BBControl. - /// - /// Attributes for the BBControl. - public int Attributes - { - get { return (int)this.Fields[7].Data; } - set { this.Fields[7].Data = value; } - } - - /// - /// Gets or sets the text of the BBControl. - /// - /// Text of the BBControl. - public string Text - { - get { return (string)this.Fields[8].Data; } - set { this.Fields[8].Data = value; } - } - } -} diff --git a/src/WixToolset.Data/Rows/ComponentRow.cs b/src/WixToolset.Data/Rows/ComponentRow.cs deleted file mode 100644 index 3ff10175..00000000 --- a/src/WixToolset.Data/Rows/ComponentRow.cs +++ /dev/null @@ -1,245 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Data.Rows -{ - using System; - using WixToolset.Data.Msi; - - /// - /// Specialization of a row for the Component table. - /// - public sealed class ComponentRow : Row - { - private string sourceFile; - - /// - /// Creates a Control row that belongs to a table. - /// - /// Original source lines for this row. - /// Table this Component row belongs to and should get its column definitions from. - public ComponentRow(SourceLineNumber sourceLineNumbers, Table table) : - base(sourceLineNumbers, table) - { - } - - /// - /// Gets or sets the identifier for this Component row. - /// - /// Identifier for this Component row. - public string Component - { - get { return (string)this.Fields[0].Data; } - set { this.Fields[0].Data = value; } - } - - /// - /// Gets or sets the ComponentId for this Component row. - /// - /// guid for this Component row. - public string Guid - { - get { return (string)this.Fields[1].Data; } - set { this.Fields[1].Data = value; } - } - - /// - /// Gets or sets the Directory_ of the Component. - /// - /// Directory of the Component. - public string Directory - { - get { return (string)this.Fields[2].Data; } - set { this.Fields[2].Data = value; } - } - - /// - /// Gets or sets the local only attribute of the Component. - /// - /// Local only attribute of the component. - public bool IsLocalOnly - { - get { return MsiInterop.MsidbComponentAttributesLocalOnly == ((int)this.Fields[3].Data & MsiInterop.MsidbComponentAttributesLocalOnly); } - set - { - if (value) - { - this.Fields[3].Data = (int)this.Fields[3].Data | MsiInterop.MsidbComponentAttributesLocalOnly; - } - else - { - this.Fields[3].Data = (int)this.Fields[3].Data & ~MsiInterop.MsidbComponentAttributesLocalOnly; - } - } - } - - /// - /// Gets or sets the source only attribute of the Component. - /// - /// Source only attribute of the component. - public bool IsSourceOnly - { - get { return MsiInterop.MsidbComponentAttributesSourceOnly == ((int)this.Fields[3].Data & MsiInterop.MsidbComponentAttributesSourceOnly); } - set - { - if (value) - { - this.Fields[3].Data = (int)this.Fields[3].Data | MsiInterop.MsidbComponentAttributesSourceOnly; - } - else - { - this.Fields[3].Data = (int)this.Fields[3].Data & ~MsiInterop.MsidbComponentAttributesSourceOnly; - } - } - } - - /// - /// Gets or sets the optional attribute of the Component. - /// - /// Optional attribute of the component. - public bool IsOptional - { - get { return MsiInterop.MsidbComponentAttributesOptional == ((int)this.Fields[3].Data & MsiInterop.MsidbComponentAttributesOptional); } - set - { - if (value) - { - this.Fields[3].Data = (int)this.Fields[3].Data | MsiInterop.MsidbComponentAttributesOptional; - } - else - { - this.Fields[3].Data = (int)this.Fields[3].Data & ~MsiInterop.MsidbComponentAttributesOptional; - } - } - } - - /// - /// Gets or sets the registry key path attribute of the Component. - /// - /// Registry key path attribute of the component. - public bool IsRegistryKeyPath - { - get { return MsiInterop.MsidbComponentAttributesRegistryKeyPath == ((int)this.Fields[3].Data & MsiInterop.MsidbComponentAttributesRegistryKeyPath); } - set - { - if (value) - { - this.Fields[3].Data = (int)this.Fields[3].Data | MsiInterop.MsidbComponentAttributesRegistryKeyPath; - } - else - { - this.Fields[3].Data = (int)this.Fields[3].Data & ~MsiInterop.MsidbComponentAttributesRegistryKeyPath; - } - } - } - - /// - /// Gets or sets the shared dll ref count attribute of the Component. - /// - /// Shared dll ref countattribute of the component. - public bool IsSharedDll - { - get { return MsiInterop.MsidbComponentAttributesSharedDllRefCount == ((int)this.Fields[3].Data & MsiInterop.MsidbComponentAttributesSharedDllRefCount); } - set - { - if (value) - { - this.Fields[3].Data = (int)this.Fields[3].Data | MsiInterop.MsidbComponentAttributesSharedDllRefCount; - } - else - { - this.Fields[3].Data = (int)this.Fields[3].Data & ~MsiInterop.MsidbComponentAttributesSharedDllRefCount; - } - } - } - - /// - /// Gets or sets the permanent attribute of the Component. - /// - /// Permanent attribute of the component. - public bool IsPermanent - { - get { return MsiInterop.MsidbComponentAttributesPermanent == ((int)this.Fields[3].Data & MsiInterop.MsidbComponentAttributesPermanent); } - set - { - if (value) - { - this.Fields[3].Data = (int)this.Fields[3].Data | MsiInterop.MsidbComponentAttributesPermanent; - } - else - { - this.Fields[3].Data = (int)this.Fields[3].Data & ~MsiInterop.MsidbComponentAttributesPermanent; - } - } - } - - /// - /// Gets or sets the ODBC data source key path attribute of the Component. - /// - /// ODBC data source key path attribute of the component. - public bool IsOdbcDataSourceKeyPath - { - get { return MsiInterop.MsidbComponentAttributesODBCDataSource == ((int)this.Fields[3].Data & MsiInterop.MsidbComponentAttributesODBCDataSource); } - set - { - if (value) - { - this.Fields[3].Data = (int)this.Fields[3].Data | MsiInterop.MsidbComponentAttributesODBCDataSource; - } - else - { - this.Fields[3].Data = (int)this.Fields[3].Data & ~MsiInterop.MsidbComponentAttributesODBCDataSource; - } - } - } - - /// - /// Gets or sets the 64 bit attribute of the Component. - /// - /// 64-bitness of the component. - public bool Is64Bit - { - get { return MsiInterop.MsidbComponentAttributes64bit == ((int)this.Fields[3].Data & MsiInterop.MsidbComponentAttributes64bit); } - set - { - if (value) - { - this.Fields[3].Data = (int)this.Fields[3].Data | MsiInterop.MsidbComponentAttributes64bit; - } - else - { - this.Fields[3].Data = (int)this.Fields[3].Data & ~MsiInterop.MsidbComponentAttributes64bit; - } - } - } - - /// - /// Gets or sets the condition of the Component. - /// - /// Condition of the Component. - public string Condition - { - get { return (string)this.Fields[4].Data; } - set { this.Fields[4].Data = value; } - } - - /// - /// Gets or sets the key path of the Component. - /// - /// Key path of the Component. - public string KeyPath - { - get { return (string)this.Fields[5].Data; } - set { this.Fields[5].Data = value; } - } - - /// - /// Gets or sets the source location to the file to fill in the Text of the control. - /// - /// Source location to the file to fill in the Text of the control. - public string SourceFile - { - get { return this.sourceFile; } - set { this.sourceFile = value; } - } - } -} diff --git a/src/WixToolset.Data/Rows/ContainerType.cs b/src/WixToolset.Data/Rows/ContainerType.cs deleted file mode 100644 index 55a74235..00000000 --- a/src/WixToolset.Data/Rows/ContainerType.cs +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Data.Rows -{ - /// - /// Types of bundle packages. - /// - public enum ContainerType - { - Attached, - Detached, - } -} diff --git a/src/WixToolset.Data/Rows/ControlRow.cs b/src/WixToolset.Data/Rows/ControlRow.cs deleted file mode 100644 index 8fa3f633..00000000 --- a/src/WixToolset.Data/Rows/ControlRow.cs +++ /dev/null @@ -1,143 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Data.Rows -{ - using System.Diagnostics.CodeAnalysis; - - /// - /// Specialization of a row for the Control table. - /// - public sealed class ControlRow : Row - { - /// - /// Creates a Control row that belongs to a table. - /// - /// Original source lines for this row. - /// Table this Control row belongs to and should get its column definitions from. - public ControlRow(SourceLineNumber sourceLineNumbers, Table table) : - base(sourceLineNumbers, table) - { - } - - /// - /// Gets or sets the dialog of the Control row. - /// - /// Primary key of the Control row. - public string Dialog - { - get { return (string)this.Fields[0].Data; } - set { this.Fields[0].Data = value; } - } - - /// - /// Gets or sets the identifier for this Control row. - /// - /// Identifier for this Control row. - public string Control - { - get { return (string)this.Fields[1].Data; } - set { this.Fields[1].Data = value; } - } - - /// - /// Gets or sets the type of the control. - /// - /// Name of the control. - [SuppressMessage("Microsoft.Naming", "CA1721:PropertyNamesShouldNotMatchGetMethods")] - public string Type - { - get { return (string)this.Fields[2].Data; } - set { this.Fields[2].Data = value; } - } - - /// - /// Gets or sets the X location of the control. - /// - /// X location of the control. - public string X - { - get { return this.Fields[3].AsString(); } - set { this.Fields[3].Data = value; } - } - - /// - /// Gets or sets the Y location of the control. - /// - /// Y location of the control. - public string Y - { - get { return this.Fields[4].AsString(); } - set { this.Fields[4].Data = value; } - } - - /// - /// Gets or sets the width of the control. - /// - /// Width of the control. - public string Width - { - get { return this.Fields[5].AsString(); } - set { this.Fields[5].Data = value; } - } - - /// - /// Gets or sets the height of the control. - /// - /// Height of the control. - public string Height - { - get { return this.Fields[6].AsString(); } - set { this.Fields[6].Data = value; } - } - - /// - /// Gets or sets the attributes for the control. - /// - /// Attributes for the control. - public int Attributes - { - get { return (int)this.Fields[7].Data; } - set { this.Fields[7].Data = value; } - } - - /// - /// Gets or sets the Property associated with the control. - /// - /// Property associated with the control. - public string Property - { - get { return (string)this.Fields[8].Data; } - set { this.Fields[8].Data = value; } - } - - /// - /// Gets or sets the text of the control. - /// - /// Text of the control. - public string Text - { - get { return (string)this.Fields[9].Data; } - set { this.Fields[9].Data = value; } - } - - /// - /// Gets or sets the next control. - /// - /// Next control. - public string Next - { - get { return (string)this.Fields[10].Data; } - set { this.Fields[10].Data = value; } - } - - /// - /// Gets or sets the help for the control. - /// - /// Help for the control. - public string Help - { - get { return (string)this.Fields[11].Data; } - set { this.Fields[11].Data = value; } - } - } -} diff --git a/src/WixToolset.Data/Rows/ExitCodeBehaviorType.cs b/src/WixToolset.Data/Rows/ExitCodeBehaviorType.cs deleted file mode 100644 index 07e66585..00000000 --- a/src/WixToolset.Data/Rows/ExitCodeBehaviorType.cs +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Data.Rows -{ - public enum ExitCodeBehaviorType - { - NotSet = -1, - Success, - Error, - ScheduleReboot, - ForceReboot, - } -} diff --git a/src/WixToolset.Data/Rows/FileAssemblyType.cs b/src/WixToolset.Data/Rows/FileAssemblyType.cs deleted file mode 100644 index 6e92a083..00000000 --- a/src/WixToolset.Data/Rows/FileAssemblyType.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Data.Rows -{ - /// - /// Every file row has an assembly type. - /// - public enum FileAssemblyType - { - /// File is not an assembly. - NotAnAssembly, - - /// File is a Common Language Runtime Assembly. - DotNetAssembly, - - /// File is Win32 SxS assembly. - Win32Assembly, - } -} diff --git a/src/WixToolset.Data/Rows/FileRow.cs b/src/WixToolset.Data/Rows/FileRow.cs deleted file mode 100644 index de5d5652..00000000 --- a/src/WixToolset.Data/Rows/FileRow.cs +++ /dev/null @@ -1,640 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Data.Rows -{ - using System; - using System.Diagnostics; - using System.Globalization; - using WixToolset.Data.Msi; - - /// - /// Specialization of a row for the file table. - /// - public sealed class FileRow : Row //, IComparable - { - //private string assemblyApplication; - //private string assemblyManifest; - //private FileAssemblyType assemblyType; - //private string directory; - //private int diskId; - //private bool fromModule; - //private bool isGeneratedShortFileName; - //private int patchGroup; - //private string processorArchitecture; - //private string source; - //private Row hashRow; - //private List assemblyNameRows; - //private string[] previousSource; - //private string symbols; - //private string[] previousSymbols; - //private PatchAttributeType patchAttributes; - //private string retainOffsets; - //private string retainLengths; - //private string ignoreOffsets; - //private string ignoreLengths; - //private string[] previousRetainOffsets; - //private string[] previousRetainLengths; - //private string[] previousIgnoreOffsets; - //private string[] previousIgnoreLengths; - //private string patch; - - /// - /// Creates a File row that belongs to a table. - /// - /// Original source lines for this row. - /// Table this File row belongs to and should get its column definitions from. - public FileRow(SourceLineNumber sourceLineNumbers, Table table) - : base(sourceLineNumbers, table) - { - //this.assemblyType = FileAssemblyType.NotAnAssembly; - //this.previousSource = new string[1]; - //this.previousSymbols = new string[1]; - //this.previousRetainOffsets = new string[1]; - //this.previousRetainLengths = new string[1]; - //this.previousIgnoreOffsets = new string[1]; - //this.previousIgnoreLengths = new string[1]; - } - - /// - /// Creates a File row that does not belong to a table. - /// - /// Original source lines for this row. - /// TableDefinition this Media row belongs to and should get its column definitions from. - public FileRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDefinition) - : base(sourceLineNumbers, tableDefinition) - { - //this.assemblyType = FileAssemblyType.NotAnAssembly; - //this.previousSource = new string[1]; - //this.previousSymbols = new string[1]; - //this.previousRetainOffsets = new string[1]; - //this.previousRetainLengths = new string[1]; - //this.previousIgnoreOffsets = new string[1]; - //this.previousIgnoreLengths = new string[1]; - } - - /// - /// Gets or sets the primary key of the file row. - /// - /// Primary key of the file row. - public string File - { - get { return (string)this.Fields[0].Data; } - set { this.Fields[0].Data = value; } - } - - /// - /// Gets or sets the component this file row belongs to. - /// - /// Component this file row belongs to. - public string Component - { - get { return (string)this.Fields[1].Data; } - set { this.Fields[1].Data = value; } - } - - /// - /// Gets or sets the name of the file. - /// - /// Name of the file. - public string FileName - { - get { return (string)this.Fields[2].Data; } - set { this.Fields[2].Data = value; } - } - - /// - /// Gets or sets the real filesystem name of the file (without a pipe). This is typically the long name of the file. - /// However, if no long name is available, falls back to the short name. - /// - /// Long Name of the file - or if no long name is available, falls back to the short name. - public string LongFileName - { - get - { - string fileName = this.FileName; - int index = fileName.IndexOf('|'); - - // If it doesn't contain a pipe, just return the whole string - if (-1 == index) - { - return fileName; - } - else // otherwise, extract the part of the string after the pipe - { - return fileName.Substring(index + 1); - } - } - } - - /// - /// Gets or sets the size of the file. - /// - /// Size of the file. - public int FileSize - { - get { return (int)this.Fields[3].Data; } - set { this.Fields[3].Data = value; } - } - - /// - /// Gets or sets the version of the file. - /// - /// Version of the file. - public string Version - { - get { return (string)this.Fields[4].Data; } - set { this.Fields[4].Data = value; } - } - - /// - /// Gets or sets the LCID of the file. - /// - /// LCID of the file. - public string Language - { - get { return (string)this.Fields[5].Data; } - set { this.Fields[5].Data = value; } - } - - /// - /// Gets or sets the attributes on a file. - /// - /// Attributes on a file. - public int Attributes - { - get { return Convert.ToInt32(this.Fields[6].Data, CultureInfo.InvariantCulture); } - set { this.Fields[6].Data = value; } - } - - /// - /// Gets or sets whether this file should be compressed. - /// - /// Whether this file should be compressed. - public YesNoType Compressed - { - get - { - bool compressedFlag = (0 < (this.Attributes & MsiInterop.MsidbFileAttributesCompressed)); - bool noncompressedFlag = (0 < (this.Attributes & MsiInterop.MsidbFileAttributesNoncompressed)); - - if (compressedFlag && noncompressedFlag) - { - throw new WixException(WixDataErrors.IllegalFileCompressionAttributes(this.SourceLineNumbers)); - } - else if (compressedFlag) - { - return YesNoType.Yes; - } - else if (noncompressedFlag) - { - return YesNoType.No; - } - else - { - return YesNoType.NotSet; - } - } - - set - { - if (YesNoType.Yes == value) - { - // these are mutually exclusive - this.Attributes |= MsiInterop.MsidbFileAttributesCompressed; - this.Attributes &= ~MsiInterop.MsidbFileAttributesNoncompressed; - } - else if (YesNoType.No == value) - { - // these are mutually exclusive - this.Attributes |= MsiInterop.MsidbFileAttributesNoncompressed; - this.Attributes &= ~MsiInterop.MsidbFileAttributesCompressed; - } - else // not specified - { - Debug.Assert(YesNoType.NotSet == value); - - // clear any compression bits - this.Attributes &= ~MsiInterop.MsidbFileAttributesCompressed; - this.Attributes &= ~MsiInterop.MsidbFileAttributesNoncompressed; - } - } - } - - /// - /// Gets or sets the sequence of the file row. - /// - /// Sequence of the file row. - public int Sequence - { - get { return (int)this.Fields[7].Data; } - set { this.Fields[7].Data = value; } - } - - /////// - /////// Gets or sets the type of assembly of file row. - /////// - /////// Assembly type for file row. - ////public FileAssemblyType AssemblyType - ////{ - //// get { return this.assemblyType; } - //// set { this.assemblyType = value; } - ////} - - /////// - /////// Gets or sets the identifier for the assembly application. - /////// - /////// Identifier for the assembly application. - ////public string AssemblyApplication - ////{ - //// get { return this.assemblyApplication; } - //// set { this.assemblyApplication = value; } - ////} - - /////// - /////// Gets or sets the identifier for the assembly manifest. - /////// - /////// Identifier for the assembly manifest. - ////public string AssemblyManifest - ////{ - //// get { return this.assemblyManifest; } - //// set { this.assemblyManifest = value; } - ////} - - /////// - /////// Gets or sets the directory of the file. - /////// - /////// Directory of the file. - ////public string Directory - ////{ - //// get { return this.directory; } - //// set { this.directory = value; } - ////} - - /////// - /////// Gets or sets the disk id for this file. - /////// - /////// Disk id for the file. - ////public int DiskId - ////{ - //// get { return this.diskId; } - //// set { this.diskId = value; } - ////} - - /////// - /////// Gets or sets the source location to the file. - /////// - /////// Source location to the file. - ////public string Source - ////{ - //// get { return this.source; } - //// set { this.source = value; } - ////} - - /////// - /////// Gets or sets the source location to the previous file. - /////// - /////// Source location to the previous file. - ////public string PreviousSource - ////{ - //// get { return this.previousSource[0]; } - //// set { this.previousSource[0] = value; } - ////} - - /////// - /////// Gets the source location to the previous files. - /////// - /////// Source location to the previous files. - ////[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")] - ////public string[] PreviousSourceArray - ////{ - //// get { return this.previousSource; } - ////} - - /////// - /////// Gets or sets the architecture the file executes on. - /////// - /////// Architecture the file executes on. - ////public string ProcessorArchitecture - ////{ - //// get { return this.processorArchitecture; } - //// set { this.processorArchitecture = value; } - ////} - - /////// - /////// Gets of sets the patch group of a patch-added file. - /////// - /////// The patch group of a patch-added file. - ////public int PatchGroup - ////{ - //// get { return this.patchGroup; } - //// set { this.patchGroup = value; } - ////} - - /////// - /////// Gets or sets the patch header of the file. - /////// - /////// Patch header of the file. - ////public string Patch - ////{ - //// get { return this.patch; } - //// set { this.patch = value; } - ////} - - /////// - /////// Gets or sets the locations to find the file's symbols. - /////// - /////// Symbol paths for the file. - ////public string Symbols - ////{ - //// get { return this.symbols; } - //// set { this.symbols = value; } - ////} - - /////// - /////// Gets or sets the locations to find the file's previous symbols. - /////// - /////// Symbol paths for the previous file. - ////public string PreviousSymbols - ////{ - //// get { return this.previousSymbols[0]; } - //// set { this.previousSymbols[0] = value; } - ////} - - /////// - /////// Gets the locations to find the files' previous symbols. - /////// - /////// Symbol paths for the previous files. - ////[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")] - ////public string[] PreviousSymbolsArray - ////{ - //// get { return this.previousSymbols; } - ////} - - /////// - /////// Gets or sets the generated short file name attribute. - /////// - /////// The generated short file name attribute. - ////public bool IsGeneratedShortFileName - ////{ - //// get { return this.isGeneratedShortFileName; } - - //// set { this.isGeneratedShortFileName = value; } - ////} - - /////// - /////// Gets or sets whether this row came from a merge module. - /////// - /////// Whether this row came from a merge module. - ////public bool FromModule - ////{ - //// get { return this.fromModule; } - //// set { this.fromModule = value; } - ////} - - /////// - /////// Gets or sets the MsiFileHash row created for this FileRow. - /////// - /////// Row for MsiFileHash table. - ////public Row HashRow - ////{ - //// get { return this.hashRow; } - //// set { this.hashRow = value; } - ////} - - /////// - /////// Gets or sets the set of MsiAssemblyName rows created for this FileRow. - /////// - /////// RowCollection of MsiAssemblyName table. - ////[SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] - ////public List AssemblyNameRows - ////{ - //// get { return this.assemblyNameRows; } - //// set { this.assemblyNameRows = value; } - ////} - - /////// - /////// Gets or sets the patching attributes to the file. - /////// - /////// Patching attributes of the file. - ////public PatchAttributeType PatchAttributes - ////{ - //// get { return this.patchAttributes; } - //// set { this.patchAttributes = value; } - ////} - - /////// - /////// Gets or sets the delta patch retain-length list for the file. - /////// - /////// RetainLength list for the file. - ////public string RetainLengths - ////{ - //// get { return this.retainLengths; } - //// set { this.retainLengths = value; } - ////} - - /////// - /////// Gets or sets the delta patch ignore-offset list for the file. - /////// - /////// IgnoreOffset list for the file. - ////public string IgnoreOffsets - ////{ - //// get { return this.ignoreOffsets; } - //// set { this.ignoreOffsets = value; } - ////} - - /////// - /////// Gets or sets the delta patch ignore-length list for the file. - /////// - /////// IgnoreLength list for the file. - ////public string IgnoreLengths - ////{ - //// get { return this.ignoreLengths; } - //// set { this.ignoreLengths = value; } - ////} - - /////// - /////// Gets or sets the delta patch retain-offset list for the file. - /////// - /////// RetainOffset list for the file. - ////public string RetainOffsets - ////{ - //// get { return this.retainOffsets; } - //// set { this.retainOffsets = value; } - ////} - - /////// - /////// Gets or sets the delta patch retain-length list for the previous file. - /////// - /////// RetainLength list for the previous file. - ////public string PreviousRetainLengths - ////{ - //// get { return this.previousRetainLengths[0]; } - //// set { this.previousRetainLengths[0] = value; } - ////} - - /////// - /////// Gets the delta patch retain-length list for the previous files. - /////// - /////// RetainLength list for the previous files. - ////[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")] - ////public string[] PreviousRetainLengthsArray - ////{ - //// get { return this.previousRetainLengths; } - ////} - - /////// - /////// Gets or sets the delta patch ignore-offset list for the previous file. - /////// - /////// IgnoreOffset list for the previous file. - ////public string PreviousIgnoreOffsets - ////{ - //// get { return this.previousIgnoreOffsets[0]; } - //// set { this.previousIgnoreOffsets[0] = value; } - ////} - - /////// - /////// Gets the delta patch ignore-offset list for the previous files. - /////// - /////// IgnoreOffset list for the previous files. - ////[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")] - ////public string[] PreviousIgnoreOffsetsArray - ////{ - //// get { return this.previousIgnoreOffsets; } - ////} - - /////// - /////// Gets or sets the delta patch ignore-length list for the previous file. - /////// - /////// IgnoreLength list for the previous file. - ////public string PreviousIgnoreLengths - ////{ - //// get { return this.previousIgnoreLengths[0]; } - //// set { this.previousIgnoreLengths[0] = value; } - ////} - - /////// - /////// Gets the delta patch ignore-length list for the previous files. - /////// - /////// IgnoreLength list for the previous files. - ////[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")] - ////public string[] PreviousIgnoreLengthsArray - ////{ - //// get { return this.previousIgnoreLengths; } - ////} - - /////// - /////// Gets or sets the delta patch retain-offset list for the previous file. - /////// - /////// RetainOffset list for the previous file. - ////public string PreviousRetainOffsets - ////{ - //// get { return this.previousRetainOffsets[0]; } - //// set { this.previousRetainOffsets[0] = value; } - ////} - - /////// - /////// Gets the delta patch retain-offset list for the previous files. - /////// - /////// RetainOffset list for the previous files. - ////[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")] - ////public string[] PreviousRetainOffsetsArray - ////{ - //// get { return this.previousRetainOffsets; } - ////} - - /////// - /////// Compares the current FileRow with another object of the same type. - /////// - /////// An object to compare with this instance. - /////// An integer that indicates the relative order of the comparands. - ////[SuppressMessage("Microsoft.Globalization", "CA1303:DoNotPassLiteralsAsLocalizedParameters", MessageId = "System.ArgumentException.#ctor(System.String)")] - ////[SuppressMessage("Microsoft.Globalization", "CA1309:UseOrdinalStringComparison")] - ////public int CompareTo(object obj) - ////{ - //// if (this == obj) - //// { - //// return 0; - //// } - - //// FileRow fileRow = obj as FileRow; - //// if (null == fileRow) - //// { - //// throw new ArgumentException(WixDataStrings.EXP_OtherObjectIsNotFileRow); - //// } - - //// int compared = this.DiskId - fileRow.DiskId; - //// if (0 == compared) - //// { - //// compared = this.patchGroup - fileRow.patchGroup; - - //// if (0 == compared) - //// { - //// compared = String.Compare(this.File, fileRow.File, StringComparison.InvariantCulture); - //// } - //// } - - //// return compared; - ////} - - /////// - /////// Copies data from another FileRow object. - /////// - /////// An row to get data from. - ////public void CopyFrom(FileRow src) - ////{ - //// for (int i = 0; i < src.Fields.Length; i++) - //// { - //// this[i] = src[i]; - //// } - //// this.assemblyManifest = src.assemblyManifest; - //// this.assemblyType = src.assemblyType; - //// this.directory = src.directory; - //// this.diskId = src.diskId; - //// this.fromModule = src.fromModule; - //// this.isGeneratedShortFileName = src.isGeneratedShortFileName; - //// this.patchGroup = src.patchGroup; - //// this.processorArchitecture = src.processorArchitecture; - //// this.source = src.source; - //// this.PreviousSource = src.PreviousSource; - //// this.Operation = src.Operation; - //// this.symbols = src.symbols; - //// this.PreviousSymbols = src.PreviousSymbols; - //// this.patchAttributes = src.patchAttributes; - //// this.retainOffsets = src.retainOffsets; - //// this.retainLengths = src.retainLengths; - //// this.ignoreOffsets = src.ignoreOffsets; - //// this.ignoreLengths = src.ignoreLengths; - //// this.PreviousRetainOffsets = src.PreviousRetainOffsets; - //// this.PreviousRetainLengths = src.PreviousRetainLengths; - //// this.PreviousIgnoreOffsets = src.PreviousIgnoreOffsets; - //// this.PreviousIgnoreLengths = src.PreviousIgnoreLengths; - ////} - - /////// - /////// Appends previous data from another FileRow object. - /////// - /////// An row to get data from. - ////public void AppendPreviousDataFrom(FileRow src) - ////{ - //// AppendStringToArray(ref this.previousSource, src.previousSource[0]); - //// AppendStringToArray(ref this.previousSymbols, src.previousSymbols[0]); - //// AppendStringToArray(ref this.previousRetainOffsets, src.previousRetainOffsets[0]); - //// AppendStringToArray(ref this.previousRetainLengths, src.previousRetainLengths[0]); - //// AppendStringToArray(ref this.previousIgnoreOffsets, src.previousIgnoreOffsets[0]); - //// AppendStringToArray(ref this.previousIgnoreLengths, src.previousIgnoreLengths[0]); - ////} - - /////// - /////// Helper method for AppendPreviousDataFrom. - /////// - /////// Destination array. - /////// Source string. - ////private static void AppendStringToArray(ref string[] destination, string source) - ////{ - //// string[] result = new string[destination.Length + 1]; - //// destination.CopyTo(result, 0); - //// result[destination.Length] = source; - //// destination = result; - ////} - } -} diff --git a/src/WixToolset.Data/Rows/MediaRow.cs b/src/WixToolset.Data/Rows/MediaRow.cs deleted file mode 100644 index f387a8d2..00000000 --- a/src/WixToolset.Data/Rows/MediaRow.cs +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Data.Rows -{ - /// - /// Specialization of a row for the Media table. - /// - public sealed class MediaRow : Row - { - /// - /// Creates a Media row that belongs to a table. - /// - /// Original source lines for this row. - /// Table this Media row belongs to and should get its column definitions from. - public MediaRow(SourceLineNumber sourceLineNumbers, Table table) - : base(sourceLineNumbers, table) - { - } - - /// - /// Gets or sets the disk id for this media row. - /// - /// Disk id. - public int DiskId - { - get { return (int)this.Fields[0].Data; } - set { this.Fields[0].Data = value; } - } - - /// - /// Gets or sets the last sequence number for this media row. - /// - /// Last sequence number. - public int LastSequence - { - get { return (int)this.Fields[1].Data; } - set { this.Fields[1].Data = value; } - } - - /// - /// Gets or sets the disk prompt for this media row. - /// - /// Disk prompt. - public string DiskPrompt - { - get { return (string)this.Fields[2].Data; } - set { this.Fields[2].Data = value; } - } - - /// - /// Gets or sets the cabinet name for this media row. - /// - /// Cabinet name. - public string Cabinet - { - get { return (string)this.Fields[3].Data; } - set { this.Fields[3].Data = value; } - } - - /// - /// Gets or sets the volume label for this media row. - /// - /// Volume label. - public string VolumeLabel - { - get { return (string)this.Fields[4].Data; } - set { this.Fields[4].Data = value; } - } - - /// - /// Gets or sets the source for this media row. - /// - /// Source. - public string Source - { - get { return (string)this.Fields[5].Data; } - set { this.Fields[5].Data = value; } - } - } -} diff --git a/src/WixToolset.Data/Rows/PatchAttributeType.cs b/src/WixToolset.Data/Rows/PatchAttributeType.cs deleted file mode 100644 index b585e845..00000000 --- a/src/WixToolset.Data/Rows/PatchAttributeType.cs +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Data.Rows -{ - using System; - - /// - /// PatchAttribute values - /// - [Flags] - public enum PatchAttributeType - { - None = 0, - - /// Prevents the updating of the file that is in fact changed in the upgraded image relative to the target images. - Ignore = 1, - - /// Set if the entire file should be installed rather than creating a binary patch. - IncludeWholeFile = 2, - - /// Set to indicate that the patch is non-vital. - AllowIgnoreOnError = 4, - - /// Allowed bits. - Defined = Ignore | IncludeWholeFile | AllowIgnoreOnError - } -} diff --git a/src/WixToolset.Data/Rows/PropertyRow.cs b/src/WixToolset.Data/Rows/PropertyRow.cs deleted file mode 100644 index 558df760..00000000 --- a/src/WixToolset.Data/Rows/PropertyRow.cs +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Data.Rows -{ - using System; - - /// - /// Specialization of a row for the upgrade table. - /// - public sealed class PropertyRow : Row - { - /// - /// Creates an Upgrade row that belongs to a table. - /// - /// Original source lines for this row. - /// Table this Upgrade row belongs to and should get its column definitions from. - public PropertyRow(SourceLineNumber sourceLineNumbers, Table table) : - base(sourceLineNumbers, table) - { - } - - /// - /// Gets and sets the upgrade code for the row. - /// - /// Property identifier for the row. - public string Property - { - get { return (string)this.Fields[0].Data; } - set { this.Fields[0].Data = value; } - } - - /// - /// Gets and sets the value for the row. - /// - /// Property value for the row. - public string Value - { - get { return (string)this.Fields[1].Data; } - set { this.Fields[1].Data = value; } - } - } -} diff --git a/src/WixToolset.Data/Rows/SummaryInfoRowCollection.cs b/src/WixToolset.Data/Rows/SummaryInfoRowCollection.cs deleted file mode 100644 index bc931f15..00000000 --- a/src/WixToolset.Data/Rows/SummaryInfoRowCollection.cs +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Data.Rows -{ - using System; - using System.Collections; - using System.Collections.ObjectModel; - - /// - /// Indexed container class for summary information rows. - /// - public sealed class SummaryInfoRowCollection : KeyedCollection - { - /// - /// Creates the keyed collection from existing rows in a table. - /// - /// The summary information table to index. - public SummaryInfoRowCollection(Table table) - { - if (0 != String.CompareOrdinal("_SummaryInformation", table.Name)) - { - string message = string.Format(WixDataStrings.EXP_UnsupportedTable, table.Name); - throw new ArgumentException(message, "table"); - } - - foreach (Row row in table.Rows) - { - this.Add(row); - } - } - - /// - /// Gets the summary property ID for the . - /// - /// The row to index. - /// The summary property ID for the . - protected override int GetKeyForItem(Row row) - { - return (int)row[0]; - } - } -} diff --git a/src/WixToolset.Data/Rows/SymbolPathType.cs b/src/WixToolset.Data/Rows/SymbolPathType.cs deleted file mode 100644 index 964e1caa..00000000 --- a/src/WixToolset.Data/Rows/SymbolPathType.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Data.Rows -{ - /// - /// The types that the WixDeltaPatchSymbolPaths table can hold. - /// - /// The order of these values is important since WixDeltaPatchSymbolPaths are sorted by this type. - public enum SymbolPathType - { - File, - Component, - Directory, - Media, - Product - }; -} diff --git a/src/WixToolset.Data/Rows/UpgradeRow.cs b/src/WixToolset.Data/Rows/UpgradeRow.cs deleted file mode 100644 index 807a9f93..00000000 --- a/src/WixToolset.Data/Rows/UpgradeRow.cs +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Data.Rows -{ - /// - /// Specialization of a row for the upgrade table. - /// - public sealed class UpgradeRow : Row - { - /// - /// Creates an Upgrade row that belongs to a table. - /// - /// Original source lines for this row. - /// Table this Upgrade row belongs to and should get its column definitions from. - public UpgradeRow(SourceLineNumber sourceLineNumbers, Table table) : - base(sourceLineNumbers, table) - { - } - - /// - /// Gets and sets the upgrade code for the row. - /// - /// Upgrade code for the row. - public string UpgradeCode - { - get { return (string)this.Fields[0].Data; } - set { this.Fields[0].Data = value; } - } - - /// - /// Gets and sets the version minimum for the row. - /// - /// Version minimum for the row. - public string VersionMin - { - get { return (string)this.Fields[1].Data; } - set { this.Fields[1].Data = value; } - } - - /// - /// Gets and sets the version maximum for the row. - /// - /// Version maximum for the row. - public string VersionMax - { - get { return (string)this.Fields[2].Data; } - set { this.Fields[2].Data = value; } - } - - /// - /// Gets and sets the language for the row. - /// - /// Language for the row. - public string Language - { - get { return (string)this.Fields[3].Data; } - set { this.Fields[3].Data = value; } - } - - /// - /// Gets and sets the attributes for the row. - /// - /// Attributes for the row. - public int Attributes - { - get { return (int)this.Fields[4].Data; } - set { this.Fields[4].Data = value; } - } - - /// - /// Gets and sets the remove code for the row. - /// - /// Remove code for the row. - public string Remove - { - get { return (string)this.Fields[5].Data; } - set { this.Fields[5].Data = value; } - } - - /// - /// Gets and sets the action property for the row. - /// - /// Action property for the row. - public string ActionProperty - { - get { return (string)this.Fields[6].Data; } - set { this.Fields[6].Data = value; } - } - } -} diff --git a/src/WixToolset.Data/Rows/WixActionRow.cs b/src/WixToolset.Data/Rows/WixActionRow.cs deleted file mode 100644 index 3009e59d..00000000 --- a/src/WixToolset.Data/Rows/WixActionRow.cs +++ /dev/null @@ -1,374 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Data.Rows -{ - using System; - using System.Collections.Generic; - using System.Diagnostics; - using System.Globalization; - using System.Xml; - using System.Xml.Schema; - - /// - /// The Sequence tables that actions may belong to. - /// - public enum SequenceTable - { - /// AdminUISequence - AdminUISequence, - - /// AdminExecuteSequence - AdminExecuteSequence, - - /// AdvtExecuteSequence - AdvtExecuteSequence, - - /// InstallUISequence - InstallUISequence, - - /// InstallExecuteSequence - InstallExecuteSequence - } - - /// - /// Specialization of a row for the sequence tables. - /// - public sealed class WixActionRow : Row, IComparable - { - private WixActionRowCollection previousActionRows; - private WixActionRowCollection nextActionRows; - - /// - /// Instantiates an ActionRow that belongs to a table. - /// - /// Original source lines for this row. - /// Table this Action row belongs to and should get its column definitions from. - public WixActionRow(SourceLineNumber sourceLineNumbers, Table table) : - base(sourceLineNumbers, table) - { - } - - /// - /// Instantiates a standard ActionRow. - /// - /// The sequence table of the standard action. - /// The name of the standard action. - /// The condition of the standard action. - /// The suggested sequence number of the standard action. - private WixActionRow(SequenceTable sequenceTable, string action, string condition, int sequence) : - base(null, WindowsInstallerStandard.GetTableDefinitions()["WixAction"]) - { - this.SequenceTable = sequenceTable; - this.Action = action; - this.Condition = condition; - this.Sequence = sequence; - this.Overridable = true; // all standard actions are overridable by default - } - - /// - /// Instantiates an ActionRow by copying data from another ActionRow. - /// - /// The row the data is copied from. - /// The previous and next action collections are not copied. - private WixActionRow(WixActionRow source) - : base(source) - { - } - - /// - /// Gets or sets the name of the action. - /// - /// The name of the action. - public string Action - { - get { return (string)this.Fields[1].Data; } - set { this.Fields[1].Data = value; } - } - - /// - /// Gets the name of the action this action should be scheduled after. - /// - /// The name of the action this action should be scheduled after. - public string After - { - get { return (string)this.Fields[5].Data; } - set { this.Fields[5].Data = value; } - } - - /// - /// Gets the name of the action this action should be scheduled before. - /// - /// The name of the action this action should be scheduled before. - public string Before - { - get { return (string)this.Fields[4].Data; } - set { this.Fields[4].Data = value; } - } - - /// - /// Gets or sets the condition of the action. - /// - /// The condition of the action. - public string Condition - { - get { return (string)this.Fields[2].Data; } - set { this.Fields[2].Data = value; } - } - - /// - /// Gets or sets whether this action is overridable. - /// - /// Whether this action is overridable. - public bool Overridable - { - get { return (1 == Convert.ToInt32(this.Fields[6].Data, CultureInfo.InvariantCulture)); } - set { this.Fields[6].Data = (value ? 1 : 0); } - } - - /// - /// Gets or sets the sequence number of this action. - /// - /// The sequence number of this action. - public int Sequence - { - get { return Convert.ToInt32(this.Fields[3].Data, CultureInfo.InvariantCulture); } - set { this.Fields[3].Data = value; } - } - - /// - /// Gets of sets the sequence table of this action. - /// - /// The sequence table of this action. - public SequenceTable SequenceTable - { - get { return (SequenceTable)Enum.Parse(typeof(SequenceTable), (string)this.Fields[0].Data); } - set { this.Fields[0].Data = value.ToString(); } - } - - /// - /// Gets the actions that should be scheduled after this action. - /// - /// The actions that should be scheduled after this action. - public WixActionRowCollection NextActionRows - { - get - { - if (null == this.nextActionRows) - { - this.nextActionRows = new WixActionRowCollection(); - } - - return this.nextActionRows; - } - } - - /// - /// Gets the actions that should be scheduled before this action. - /// - /// The actions that should be scheduled before this action. - public WixActionRowCollection PreviousActionRows - { - get - { - if (null == this.previousActionRows) - { - this.previousActionRows = new WixActionRowCollection(); - } - - return this.previousActionRows; - } - } - - /// - /// Creates a clone of the action row. - /// - /// A shallow copy of the source object. - /// The previous and next action collections are not copied. - public WixActionRow Clone() - { - return new WixActionRow(this); - } - - /// - /// Compares the current instance with another object of the same type. - /// - /// Other reference to compare this one to. - /// Returns less than 0 for less than, 0 for equals, and greater than 0 for greater. - public int CompareTo(object obj) - { - WixActionRow otherActionRow = (WixActionRow)obj; - - return this.Sequence.CompareTo(otherActionRow.Sequence); - } - - /// - /// Parses ActionRows from the Xml reader. - /// - /// Xml reader that contains serialized ActionRows. - /// The parsed ActionRows. - internal static WixActionRow[] Parse(XmlReader reader) - { - Debug.Assert("action" == reader.LocalName); - - string id = null; - string condition = null; - bool empty = reader.IsEmptyElement; - int sequence = int.MinValue; - int sequenceCount = 0; - SequenceTable[] sequenceTables = new SequenceTable[Enum.GetValues(typeof(SequenceTable)).Length]; - - while (reader.MoveToNextAttribute()) - { - switch (reader.Name) - { - case "name": - id = reader.Value; - break; - case "AdminExecuteSequence": - if (reader.Value.Equals("yes")) - { - sequenceTables[sequenceCount] = SequenceTable.AdminExecuteSequence; - ++sequenceCount; - } - break; - case "AdminUISequence": - if (reader.Value.Equals("yes")) - { - sequenceTables[sequenceCount] = SequenceTable.AdminUISequence; - ++sequenceCount; - } - break; - case "AdvtExecuteSequence": - if (reader.Value.Equals("yes")) - { - sequenceTables[sequenceCount] = SequenceTable.AdvtExecuteSequence; - ++sequenceCount; - } - break; - case "condition": - condition = reader.Value; - break; - case "InstallExecuteSequence": - if (reader.Value.Equals("yes")) - { - sequenceTables[sequenceCount] = SequenceTable.InstallExecuteSequence; - ++sequenceCount; - } - break; - case "InstallUISequence": - if (reader.Value.Equals("yes")) - { - sequenceTables[sequenceCount] = SequenceTable.InstallUISequence; - ++sequenceCount; - } - break; - case "sequence": - sequence = Convert.ToInt32(reader.Value, CultureInfo.InvariantCulture); - break; - } - } - - if (null == id) - { - throw new XmlException(); - } - - if (int.MinValue == sequence) - { - throw new XmlException(); - } - else if (1 > sequence) - { - throw new XmlException(); - } - - if (0 == sequenceCount) - { - throw new XmlException(); - } - - if (!empty && reader.Read() && XmlNodeType.EndElement != reader.MoveToContent()) - { - throw new XmlException(); - } - - // create the actions - WixActionRow[] actionRows = new WixActionRow[sequenceCount]; - for (int i = 0; i < sequenceCount; i++) - { - WixActionRow actionRow = new WixActionRow(sequenceTables[i], id, condition, sequence); - actionRows[i] = actionRow; - } - - return actionRows; - } - - /// - /// Determines whether this ActionRow contains the specified ActionRow as a child in its dependency tree. - /// - /// The possible child ActionRow. - /// true if the ActionRow is a child of this ActionRow; false otherwise. - public bool ContainsChildActionRow(WixActionRow actionRow) - { - if (null != this.previousActionRows) - { - if (this.previousActionRows.Contains(actionRow.SequenceTable, actionRow.Action)) - { - return true; - } - } - - if (null != this.nextActionRows) - { - if (this.nextActionRows.Contains(actionRow.SequenceTable, actionRow.Action)) - { - return true; - } - } - - return false; - } - - /// - /// Get all the actions scheduled before this one in a particular sequence table. - /// - /// The sequence table. - /// A RowCollection which will contain all the previous actions. - public void GetAllPreviousActionRows(SequenceTable sequenceTable, IList allPreviousActionRows) - { - if (null != this.previousActionRows) - { - foreach (WixActionRow actionRow in this.previousActionRows) - { - if (sequenceTable == actionRow.SequenceTable) - { - actionRow.GetAllPreviousActionRows(sequenceTable, allPreviousActionRows); - allPreviousActionRows.Add(actionRow); - actionRow.GetAllNextActionRows(sequenceTable, allPreviousActionRows); - } - } - } - } - - /// - /// Get all the actions scheduled after this one in a particular sequence table. - /// - /// The sequence table. - /// A RowCollection which will contain all the next actions. - public void GetAllNextActionRows(SequenceTable sequenceTable, IList allNextActionRows) - { - if (null != this.nextActionRows) - { - foreach (WixActionRow actionRow in this.nextActionRows) - { - if (sequenceTable == actionRow.SequenceTable) - { - actionRow.GetAllPreviousActionRows(sequenceTable, allNextActionRows); - allNextActionRows.Add(actionRow); - actionRow.GetAllNextActionRows(sequenceTable, allNextActionRows); - } - } - } - } - } -} diff --git a/src/WixToolset.Data/Rows/WixActionRowCollection.cs b/src/WixToolset.Data/Rows/WixActionRowCollection.cs deleted file mode 100644 index 513a104f..00000000 --- a/src/WixToolset.Data/Rows/WixActionRowCollection.cs +++ /dev/null @@ -1,222 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Data.Rows -{ - using System; - using System.Collections; - using System.Diagnostics; - using System.Xml; - - /// - /// A collection of action rows sorted by their sequence table and action name. - /// - public sealed class WixActionRowCollection : ICollection - { - private SortedList collection; - - /// - /// Creates a new action table object. - /// - public WixActionRowCollection() - { - this.collection = new SortedList(); - } - - /// - /// Gets the number of items in the collection. - /// - /// Number of items in collection. - public int Count - { - get { return this.collection.Count; } - } - - /// - /// Gets if the collection has been synchronized. - /// - /// True if the collection has been synchronized. - public bool IsSynchronized - { - get { return this.collection.IsSynchronized; } - } - - /// - /// Gets the object used to synchronize the collection. - /// - /// Oject used the synchronize the collection. - public object SyncRoot - { - get { return this; } - } - - /// - /// Get an ActionRow by its sequence table and action name. - /// - /// The sequence table of the ActionRow. - /// The action name of the ActionRow. - public WixActionRow this[SequenceTable sequenceTable, string action] - { - get { return (WixActionRow)this.collection[GetKey(sequenceTable, action)]; } - } - - /// - /// Add an ActionRow to the collection. - /// - /// The ActionRow to add. - /// true to overwrite an existing ActionRow; false otherwise. - public void Add(WixActionRow actionRow, bool overwrite) - { - string key = GetKey(actionRow.SequenceTable, actionRow.Action); - - if (overwrite) - { - this.collection[key] = actionRow; - } - else - { - this.collection.Add(key, actionRow); - } - } - - /// - /// Add an ActionRow to the collection. - /// - /// The ActionRow to add. - public void Add(WixActionRow actionRow) - { - this.Add(actionRow, false); - } - - /// - /// Determines if the collection contains an ActionRow with a specific sequence table and name. - /// - /// The sequence table of the ActionRow. - /// The action name of the ActionRow. - /// true if the ActionRow was found; false otherwise. - public bool Contains(SequenceTable sequenceTable, string action) - { - return this.collection.Contains(GetKey(sequenceTable, action)); - } - - /// - /// Copies the collection into an array. - /// - /// Array to copy the collection into. - /// Index to start copying from. - public void CopyTo(System.Array array, int index) - { - this.collection.Values.CopyTo(array, index); - } - - /// - /// Gets the enumerator for the collection. - /// - /// The enumerator for the collection. - public IEnumerator GetEnumerator() - { - return this.collection.Values.GetEnumerator(); - } - - /// - /// Remove an ActionRow from the collection. - /// - /// The sequence table of the ActionRow. - /// The action name of the ActionRow. - public void Remove(SequenceTable sequenceTable, string action) - { - this.collection.Remove(GetKey(sequenceTable, action)); - } - - /// - /// Load an action table from an XmlReader. - /// - /// Reader to get data from. - /// The ActionRowCollection represented by the xml. - internal static WixActionRowCollection Load(XmlReader reader) - { - reader.MoveToContent(); - - return Parse(reader); - } - - /// - /// Creates a new action table object and populates it from an Xml reader. - /// - /// Reader to get data from. - /// The parsed ActionTable. - private static WixActionRowCollection Parse(XmlReader reader) - { - if (!reader.LocalName.Equals("actions")) - { - throw new XmlException(); - } - - WixActionRowCollection actionRows = new WixActionRowCollection(); - bool empty = reader.IsEmptyElement; - - while (reader.MoveToNextAttribute()) - { - } - - if (!empty) - { - bool done = false; - - // loop through all the fields in a row - while (!done && reader.Read()) - { - switch (reader.NodeType) - { - case XmlNodeType.Element: - switch (reader.LocalName) - { - case "action": - WixActionRow[] parsedActionRows = WixActionRow.Parse(reader); - - foreach (WixActionRow actionRow in parsedActionRows) - { - actionRows.Add(actionRow); - } - break; - default: - throw new XmlException(); - } - break; - case XmlNodeType.EndElement: - done = true; - break; - } - } - - if (!done) - { - throw new XmlException(); - } - } - - return actionRows; - } - - /// - /// Get the key for storing an ActionRow. - /// - /// The sequence table of the ActionRow. - /// The action name of the ActionRow. - /// The string key. - private static string GetKey(SequenceTable sequenceTable, string action) - { - return GetKey(sequenceTable.ToString(), action); - } - - /// - /// Get the key for storing an ActionRow. - /// - /// The sequence table of the ActionRow. - /// The action name of the ActionRow. - /// The string key. - private static string GetKey(string sequenceTable, string action) - { - return String.Concat(sequenceTable, '/', action); - } - } -} diff --git a/src/WixToolset.Data/Rows/WixApprovedExeForElevationRow.cs b/src/WixToolset.Data/Rows/WixApprovedExeForElevationRow.cs deleted file mode 100644 index c10a39ab..00000000 --- a/src/WixToolset.Data/Rows/WixApprovedExeForElevationRow.cs +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Data.Rows -{ - - /// - /// Specialization of a row for the WixApprovedExeForElevation table. - /// - public class WixApprovedExeForElevationRow : Row - { - /// - /// Creates an ApprovedExeForElevation row that does not belong to a table. - /// - /// Original source lines for this row. - /// TableDefinition this ApprovedExeForElevation row belongs to and should get its column definitions from. - public WixApprovedExeForElevationRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) : - base(sourceLineNumbers, tableDef) - { - } - - /// - /// Creates an ApprovedExeForElevation row that belongs to a table. - /// - /// Original source lines for this row. - /// Table this ApprovedExeForElevation row belongs to and should get its column definitions from. - public WixApprovedExeForElevationRow(SourceLineNumber sourceLineNumbers, Table table) - : base(sourceLineNumbers, table) - { - } - - /// - /// Gets or sets the ApprovedExeForElevation identifier. - /// - /// The ApprovedExeForElevation identifier. - public string Id - { - get { return (string)this.Fields[0].Data; } - set { this.Fields[0].Data = value; } - } - - /// - /// Gets or sets the Key path. - /// - /// The Key path. - public string Key - { - get { return (string)this.Fields[1].Data; } - set { this.Fields[1].Data = value; } - } - - /// - /// Gets or sets the Value name. - /// - /// The Value name. - public string ValueName - { - get { return (string)this.Fields[2].Data; } - set { this.Fields[2].Data = value; } - } - - /// - /// Gets or sets the attibutes. - /// - /// The BundleApprovedExeForElevationAttributes. - public BundleApprovedExeForElevationAttributes Attributes - { - get { return (BundleApprovedExeForElevationAttributes)this.Fields[3].Data; } - set { this.Fields[3].Data = (int)value; } - } - - /// - /// Gets whether this row is 64-bit. - /// - public bool Win64 - { - get { return BundleApprovedExeForElevationAttributes.Win64 == (this.Attributes & BundleApprovedExeForElevationAttributes.Win64); } - } - } -} diff --git a/src/WixToolset.Data/Rows/WixBundleCatalogRow.cs b/src/WixToolset.Data/Rows/WixBundleCatalogRow.cs deleted file mode 100644 index 05c1e597..00000000 --- a/src/WixToolset.Data/Rows/WixBundleCatalogRow.cs +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Data.Rows -{ - /// - /// Specialization of a row for the WixCatalog table. - /// - public sealed class WixBundleCatalogRow : Row - { - /// - /// Creates a Catalog row that does not belong to a table. - /// - /// Original source lines for this row. - /// TableDefinition this Catalog row belongs to and should get its column definitions from. - public WixBundleCatalogRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) : - base(sourceLineNumbers, tableDef) - { - } - - /// - /// Creates a Catalog row that belongs to a table. - /// - /// Original source lines for this row. - /// Table this Catalog row belongs to and should get its column definitions from. - public WixBundleCatalogRow(SourceLineNumber sourceLineNumbers, Table table) - : base(sourceLineNumbers, table) - { - } - - /// - /// Gets or sets the catalog identifier. - /// - /// The catalog identifier. - public string Id - { - get { return (string)this.Fields[0].Data; } - set { this.Fields[0].Data = value; } - } - - /// - /// Gets or sets the payload identifier. - /// - /// The payload identifier. - public string Payload - { - get { return (string)this.Fields[1].Data; } - set { this.Fields[1].Data = value; } - } - } -} diff --git a/src/WixToolset.Data/Rows/WixBundleContainerRow.cs b/src/WixToolset.Data/Rows/WixBundleContainerRow.cs deleted file mode 100644 index 7b03dcc5..00000000 --- a/src/WixToolset.Data/Rows/WixBundleContainerRow.cs +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Data.Rows -{ - /// - /// Specialization of a row for the Container table. - /// - public class WixBundleContainerRow : Row - { - /// - /// Creates a ContainerRow row that does not belong to a table. - /// - /// Original source lines for this row. - /// TableDefinition this Media row belongs to and should get its column definitions from. - public WixBundleContainerRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) : - base(sourceLineNumbers, tableDef) - { - } - - /// - /// Creates a ContainerRow row that belongs to a table. - /// - /// Original source lines for this row. - /// Table this Media row belongs to and should get its column definitions from. - public WixBundleContainerRow(SourceLineNumber sourceLineNumbers, Table table) : - base(sourceLineNumbers, table) - { - } - - public string Id - { - get { return (string)this.Fields[0].Data; } - set { this.Fields[0].Data = value; } - } - - public string Name - { - get { return (string)this.Fields[1].Data; } - set { this.Fields[1].Data = value; } - } - - public ContainerType Type - { - get { return (ContainerType)this.Fields[2].Data; } - set { this.Fields[2].Data = (int)value; } - } - - public string DownloadUrl - { - get { return (string)this.Fields[3].Data; } - set { this.Fields[3].Data = value; } - } - - public long Size - { - get { return (long)this.Fields[4].Data; } - set { this.Fields[4].Data = value; } - } - - public string Hash - { - get { return (string)this.Fields[5].Data; } - set { this.Fields[5].Data = value; } - } - - public int AttachedContainerIndex - { - get { return (null == this.Fields[6].Data) ? -1 : (int)this.Fields[6].Data; } - set { this.Fields[6].Data = value; } - } - - public string WorkingPath - { - get { return (string)this.Fields[7].Data; } - set { this.Fields[7].Data = value; } - } - } -} diff --git a/src/WixToolset.Data/Rows/WixBundleExePackageAttributes.cs b/src/WixToolset.Data/Rows/WixBundleExePackageAttributes.cs deleted file mode 100644 index 1d4d7bbb..00000000 --- a/src/WixToolset.Data/Rows/WixBundleExePackageAttributes.cs +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Data.Rows -{ - using System; - - [Flags] - public enum WixBundleExePackageAttributes - { - Repairable = 0x1, - } -} diff --git a/src/WixToolset.Data/Rows/WixBundleExePackageRow.cs b/src/WixToolset.Data/Rows/WixBundleExePackageRow.cs deleted file mode 100644 index 5bca6029..00000000 --- a/src/WixToolset.Data/Rows/WixBundleExePackageRow.cs +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Data.Rows -{ - /// - /// Specialization of a row for the WixBundleExePackage table. - /// - public sealed class WixBundleExePackageRow : Row - { - /// - /// Creates a WixBundleExePackage row that does not belong to a table. - /// - /// Original source lines for this row. - /// TableDefinition this row belongs to and should get its column definitions from. - public WixBundleExePackageRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) : - base(sourceLineNumbers, tableDef) - { - } - - /// - /// Creates a WixBundleExePackageRow row that belongs to a table. - /// - /// Original source lines for this row. - /// Table this row belongs to and should get its column definitions from. - public WixBundleExePackageRow(SourceLineNumber sourceLineNumbers, Table table) : - base(sourceLineNumbers, table) - { - } - - /// - /// Gets or sets the foreign key identifier to the ChainPackage row. - /// - public string ChainPackageId - { - get { return (string)this.Fields[0].Data; } - set { this.Fields[0].Data = value; } - } - - /// - /// Gets or sets the raw Exe attributes of a patch. - /// - public WixBundleExePackageAttributes Attributes - { - get { return (WixBundleExePackageAttributes)this.Fields[1].Data; } - set { this.Fields[1].Data = value; } - } - - /// - /// Gets or sets the protcol for the executable package. - /// - public string DetectCondition - { - get { return (string)this.Fields[2].Data; } - set { this.Fields[2].Data = value; } - } - - /// - /// Gets or sets the install command for the executable package. - /// - public string InstallCommand - { - get { return (string)this.Fields[3].Data; } - set { this.Fields[3].Data = value; } - } - - /// - /// Gets or sets the repair command for the executable package. - /// - public string RepairCommand - { - get { return (string)this.Fields[4].Data; } - set { this.Fields[4].Data = value; } - } - - /// - /// Gets or sets the uninstall command for the executable package. - /// - public string UninstallCommand - { - get { return (string)this.Fields[5].Data; } - set { this.Fields[5].Data = value; } - } - - /// - /// Gets or sets the protcol for the executable package. - /// - public string ExeProtocol - { - get { return (string)this.Fields[6].Data; } - set { this.Fields[6].Data = value; } - } - - /// - /// Gets whether the executable package is repairable. - /// - public bool Repairable - { - get { return 0 != (this.Attributes & WixBundleExePackageAttributes.Repairable); } - } - } -} diff --git a/src/WixToolset.Data/Rows/WixBundleMsiFeatureRow.cs b/src/WixToolset.Data/Rows/WixBundleMsiFeatureRow.cs deleted file mode 100644 index 551eae20..00000000 --- a/src/WixToolset.Data/Rows/WixBundleMsiFeatureRow.cs +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Data.Rows -{ - /// - /// Specialization of a row for the MsiFeature table. - /// - public class WixBundleMsiFeatureRow : Row - { - /// - /// Creates a MsiFeatureRow row that does not belong to a table. - /// - /// Original source lines for this row. - /// TableDefinition this Media row belongs to and should get its column definitions from. - public WixBundleMsiFeatureRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) : - base(sourceLineNumbers, tableDef) - { - } - - /// - /// Creates a MsiFeatureRow row that belongs to a table. - /// - /// Original source lines for this row. - /// Table this Media row belongs to and should get its column definitions from. - public WixBundleMsiFeatureRow(SourceLineNumber sourceLineNumbers, Table table) : - base(sourceLineNumbers, table) - { - } - - /// - /// Gets or sets the foreign key identifier to the ChainPackage row. - /// - public string ChainPackageId - { - get { return (string)this.Fields[0].Data; } - set { this.Fields[0].Data = value; } - } - - public string Name - { - get { return (string)this.Fields[1].Data; } - set { this.Fields[1].Data = value; } - } - - public long Size - { - get { return (long)this.Fields[2].Data; } - set { this.Fields[2].Data = value; } - } - - public string Parent - { - get { return (string)this.Fields[3].Data; } - set { this.Fields[3].Data = value; } - } - - public string Title - { - get { return (string)this.Fields[4].Data; } - set { this.Fields[4].Data = value; } - } - - public string Description - { - get { return (string)this.Fields[5].Data; } - set { this.Fields[5].Data = value; } - } - - public int Display - { - get { return (int)this.Fields[6].Data; } - set { this.Fields[6].Data = value; } - } - - public int Level - { - get { return (int)this.Fields[7].Data; } - set { this.Fields[7].Data = value; } - } - - public string Directory - { - get { return (string)this.Fields[8].Data; } - set { this.Fields[8].Data = value; } - } - - public int Attributes - { - get { return (int)this.Fields[9].Data; } - set { this.Fields[9].Data = value; } - } - } -} diff --git a/src/WixToolset.Data/Rows/WixBundleMsiPackageAttributes.cs b/src/WixToolset.Data/Rows/WixBundleMsiPackageAttributes.cs deleted file mode 100644 index fc038f81..00000000 --- a/src/WixToolset.Data/Rows/WixBundleMsiPackageAttributes.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Data.Rows -{ - using System; - - [Flags] - public enum WixBundleMsiPackageAttributes - { - DisplayInternalUI = 0x1, - EnableFeatureSelection = 0x4, - ForcePerMachine = 0x2, - SuppressLooseFilePayloadGeneration = 0x8, - } -} diff --git a/src/WixToolset.Data/Rows/WixBundleMsiPackageRow.cs b/src/WixToolset.Data/Rows/WixBundleMsiPackageRow.cs deleted file mode 100644 index 22e66a7a..00000000 --- a/src/WixToolset.Data/Rows/WixBundleMsiPackageRow.cs +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Data.Rows -{ - using System; - using System.Globalization; - - /// - /// Specialization of a row for the WixBundleMsiPackage table. - /// - public sealed class WixBundleMsiPackageRow : Row - { - /// - /// Creates a WixBundleMsiPackage row that does not belong to a table. - /// - /// Original source lines for this row. - /// TableDefinition this row belongs to and should get its column definitions from. - public WixBundleMsiPackageRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) : - base(sourceLineNumbers, tableDef) - { - } - - /// - /// Creates a WixBundleMsiPackageRow row that belongs to a table. - /// - /// Original source lines for this row. - /// Table this row belongs to and should get its column definitions from. - public WixBundleMsiPackageRow(SourceLineNumber sourceLineNumbers, Table table) : - base(sourceLineNumbers, table) - { - } - - /// - /// Gets or sets the foreign key identifier to the ChainPackage row. - /// - public string ChainPackageId - { - get { return (string)this.Fields[0].Data; } - set { this.Fields[0].Data = value; } - } - - /// - /// Gets or sets the raw MSI attributes of a package. - /// - public WixBundleMsiPackageAttributes Attributes - { - get { return (WixBundleMsiPackageAttributes)this.Fields[1].Data; } - set { this.Fields[1].Data = value; } - } - - /// - /// Gets or sets the MSI package's product code. - /// - public string ProductCode - { - get { return (string)this.Fields[2].Data; } - set { this.Fields[2].Data = value; } - } - - /// - /// Gets or sets the MSI package's upgrade code. - /// - public string UpgradeCode - { - get { return (string)this.Fields[3].Data; } - set { this.Fields[3].Data = value; } - } - - /// - /// Gets or sets the product version of the MSI package. - /// - public string ProductVersion - { - get { return (string)this.Fields[4].Data; } - set { this.Fields[4].Data = value; } - } - - /// - /// Gets or sets the language of the MSI package. - /// - public int ProductLanguage - { - get { return Convert.ToInt32(this.Fields[5].Data, CultureInfo.InvariantCulture); } - set { this.Fields[5].Data = value; } - } - - /// - /// Gets or sets the product name of the MSI package. - /// - public string ProductName - { - get { return (string)this.Fields[6].Data; } - set { this.Fields[6].Data = value; } - } - - /// - /// Gets or sets the MSI package's manufacturer. - /// - public string Manufacturer - { - get { return (string)this.Fields[7].Data; } - set { this.Fields[7].Data = value; } - } - - /// - /// Gets the display internal UI of a package. - /// - public bool DisplayInternalUI - { - get { return 0 != (this.Attributes & WixBundleMsiPackageAttributes.DisplayInternalUI); } - } - - /// - /// Gets the display internal UI of a package. - /// - public bool EnableFeatureSelection - { - get { return 0 != (this.Attributes & WixBundleMsiPackageAttributes.EnableFeatureSelection); } - } - - /// - /// Gets the display internal UI of a package. - /// - public bool ForcePerMachine - { - get { return 0 != (this.Attributes & WixBundleMsiPackageAttributes.ForcePerMachine); } - } - - /// - /// Gets the suppress loose file payload generation of a package. - /// - public bool SuppressLooseFilePayloadGeneration - { - get { return 0 != (this.Attributes & WixBundleMsiPackageAttributes.SuppressLooseFilePayloadGeneration); } - } - } -} diff --git a/src/WixToolset.Data/Rows/WixBundleMsiPropertyRow.cs b/src/WixToolset.Data/Rows/WixBundleMsiPropertyRow.cs deleted file mode 100644 index 524f7929..00000000 --- a/src/WixToolset.Data/Rows/WixBundleMsiPropertyRow.cs +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Data.Rows -{ - /// - /// Specialization of a row for the WixBundleMsiProperty table. - /// - public sealed class WixBundleMsiPropertyRow : Row - { - /// - /// Creates an WixBundleMsiProperty row that belongs to a table. - /// - /// Original source lines for this row. - /// Table this WixBundleMsiProperty row belongs to and should get its column definitions from. - public WixBundleMsiPropertyRow(SourceLineNumber sourceLineNumbers, Table table) : - base(sourceLineNumbers, table) - { - } - - /// - /// Gets or sets the foreign key identifier to the ChainPackage row. - /// - public string ChainPackageId - { - get { return (string)this.Fields[0].Data; } - set { this.Fields[0].Data = value; } - } - - /// - /// Gets and sets the property identity. - /// - public string Name - { - get { return (string)this.Fields[1].Data; } - set { this.Fields[1].Data = value; } - } - - /// - /// Gets and sets the value for the row. - /// - /// MsiProperty value for the row. - public string Value - { - get { return (string)this.Fields[2].Data; } - set { this.Fields[2].Data = value; } - } - - /// - /// Gets and sets the condition for the row. - /// - /// MsiProperty condition for the row. - public string Condition - { - get { return (string)this.Fields[3].Data; } - set { this.Fields[3].Data = value; } - } - } -} diff --git a/src/WixToolset.Data/Rows/WixBundleMspPackageAttributes.cs b/src/WixToolset.Data/Rows/WixBundleMspPackageAttributes.cs deleted file mode 100644 index 8f33e283..00000000 --- a/src/WixToolset.Data/Rows/WixBundleMspPackageAttributes.cs +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Data.Rows -{ - using System; - - [Flags] - public enum WixBundleMspPackageAttributes - { - DisplayInternalUI = 0x1, - Slipstream = 0x2, - TargetUnspecified = 0x4, - } -} diff --git a/src/WixToolset.Data/Rows/WixBundleMspPackageRow.cs b/src/WixToolset.Data/Rows/WixBundleMspPackageRow.cs deleted file mode 100644 index eccf0aea..00000000 --- a/src/WixToolset.Data/Rows/WixBundleMspPackageRow.cs +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Data.Rows -{ - /// - /// Specialization of a row for the ChainMspPackage table. - /// - public sealed class WixBundleMspPackageRow : Row - { - /// - /// Creates a ChainMspPackage row that does not belong to a table. - /// - /// Original source lines for this row. - /// TableDefinition this row belongs to and should get its column definitions from. - public WixBundleMspPackageRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) : - base(sourceLineNumbers, tableDef) - { - } - - /// - /// Creates a WixBundleMspPackage row that belongs to a table. - /// - /// Original source lines for this row. - /// Table this row belongs to and should get its column definitions from. - public WixBundleMspPackageRow(SourceLineNumber sourceLineNumbers, Table table) : - base(sourceLineNumbers, table) - { - } - - /// - /// Gets or sets the foreign key identifier to the ChainPackage row. - /// - public string ChainPackageId - { - get { return (string)this.Fields[0].Data; } - set { this.Fields[0].Data = value; } - } - - /// - /// Gets or sets the raw MSP attributes of a patch. - /// - public WixBundleMspPackageAttributes Attributes - { - get { return (WixBundleMspPackageAttributes)this.Fields[1].Data; } - set { this.Fields[1].Data = value; } - } - - /// - /// Gets or sets the patch code. - /// - public string PatchCode - { - get { return (string)this.Fields[2].Data; } - set { this.Fields[2].Data = value; } - } - - /// - /// Gets or sets the patch's manufacturer. - /// - public string Manufacturer - { - get { return (string)this.Fields[3].Data; } - set { this.Fields[3].Data = value; } - } - - /// - /// Gets or sets the patch's xml. - /// - public string PatchXml - { - get { return (string)this.Fields[4].Data; } - set { this.Fields[4].Data = value; } - } - - /// - /// Gets the display internal UI of a patch. - /// - public bool DisplayInternalUI - { - get { return 0 != (this.Attributes & WixBundleMspPackageAttributes.DisplayInternalUI); } - } - - /// - /// Gets whether to slipstream the patch. - /// - public bool Slipstream - { - get { return 0 != (this.Attributes & WixBundleMspPackageAttributes.Slipstream); } - } - - /// - /// Gets whether the patch targets an unspecified number of packages. - /// - public bool TargetUnspecified - { - get { return 0 != (this.Attributes & WixBundleMspPackageAttributes.TargetUnspecified); } - } - } -} diff --git a/src/WixToolset.Data/Rows/WixBundleMsuPackageRow.cs b/src/WixToolset.Data/Rows/WixBundleMsuPackageRow.cs deleted file mode 100644 index 0df635c2..00000000 --- a/src/WixToolset.Data/Rows/WixBundleMsuPackageRow.cs +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Data.Rows -{ - /// - /// Specialization of a row for the WixBundleMsuPackage table. - /// - public sealed class WixBundleMsuPackageRow : Row - { - /// - /// Creates a WixBundleMsuPackage row that does not belong to a table. - /// - /// Original source lines for this row. - /// TableDefinition this row belongs to and should get its column definitions from. - public WixBundleMsuPackageRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) : - base(sourceLineNumbers, tableDef) - { - } - - /// - /// Creates a WixBundleMsuPackage row that belongs to a table. - /// - /// Original source lines for this row. - /// Table this row belongs to and should get its column definitions from. - public WixBundleMsuPackageRow(SourceLineNumber sourceLineNumbers, Table table) : - base(sourceLineNumbers, table) - { - } - - /// - /// Gets or sets the foreign key identifier to the ChainPackage row. - /// - public string ChainPackageId - { - get { return (string)this.Fields[0].Data; } - set { this.Fields[0].Data = value; } - } - - /// - /// Gets or sets the detection condition the package. - /// - public string DetectCondition - { - get { return (string)this.Fields[1].Data; } - set { this.Fields[1].Data = value; } - } - - /// - /// Gets or sets the KB of the package. - /// - public string MsuKB - { - get { return (string)this.Fields[2].Data; } - set { this.Fields[2].Data = value; } - } - } -} diff --git a/src/WixToolset.Data/Rows/WixBundlePackageAttributes.cs b/src/WixToolset.Data/Rows/WixBundlePackageAttributes.cs deleted file mode 100644 index 5b88ea5b..00000000 --- a/src/WixToolset.Data/Rows/WixBundlePackageAttributes.cs +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Data.Rows -{ - using System; - - [Flags] - public enum WixBundlePackageAttributes - { - Permanent = 0x1, - Visible = 0x2, - } -} diff --git a/src/WixToolset.Data/Rows/WixBundlePackageCommandLineRow.cs b/src/WixToolset.Data/Rows/WixBundlePackageCommandLineRow.cs deleted file mode 100644 index eba647d5..00000000 --- a/src/WixToolset.Data/Rows/WixBundlePackageCommandLineRow.cs +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Data.Rows -{ - using System; - - /// - /// Specialization of a row for the WixBundlePackageCommandLine table. - /// - public class WixBundlePackageCommandLineRow : Row - { - /// - /// Creates a WixBundlePackageCommandLineRow row that does not belong to a table. - /// - /// Original source lines for this row. - /// TableDefinition this WixBundlePackageCommandLineRow row belongs to and should get its column definitions from. - public WixBundlePackageCommandLineRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) : - base(sourceLineNumbers, tableDef) - { - } - - /// - /// Creates an WixBundlePackageCommandLineRow row that belongs to a table. - /// - /// Original source lines for this row. - /// Table this WixBundlePackageCommandLineRow row belongs to and should get its column definitions from. - public WixBundlePackageCommandLineRow(SourceLineNumber sourceLineNumbers, Table table) - : base(sourceLineNumbers, table) - { - } - - /// - /// Gets or sets the package identifier. - /// - /// The package identifier. - public string ChainPackageId - { - get { return (string)this.Fields[0].Data; } - set { this.Fields[0].Data = value; } - } - - /// - /// Gets or sets the command-line argument for installation. - /// - /// The command-line argument. - public string InstallArgument - { - get { return (string)this.Fields[1].Data; } - set { this.Fields[1].Data = value; } - } - - /// - /// Gets or sets the command-line argument for uninstallation. - /// - /// The command-line argument. - public string UninstallArgument - { - get { return (string)this.Fields[2].Data; } - set { this.Fields[2].Data = value; } - } - - /// - /// Gets or sets the command-line argument for repair. - /// - /// The command-line argument. - public string RepairArgument - { - get { return (string)this.Fields[3].Data; } - set { this.Fields[3].Data = value; } - } - - /// - /// Gets or sets the condition. - /// - /// The condition. - public string Condition - { - get { return (string)this.Fields[4].Data; } - set { this.Fields[4].Data = value; } - } - } -} diff --git a/src/WixToolset.Data/Rows/WixBundlePackageExitCodeRow.cs b/src/WixToolset.Data/Rows/WixBundlePackageExitCodeRow.cs deleted file mode 100644 index 410c191e..00000000 --- a/src/WixToolset.Data/Rows/WixBundlePackageExitCodeRow.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Data.Rows -{ - /// - /// Specialization of a row for the ExitCode table. - /// - public class WixBundlePackageExitCodeRow : Row - { - /// - /// Creates a ExitCodeRow row that does not belong to a table. - /// - /// Original source lines for this row. - /// TableDefinition this Media row belongs to and should get its column definitions from. - public WixBundlePackageExitCodeRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) : - base(sourceLineNumbers, tableDef) - { - } - - /// - /// Creates a ExitCodeRow row that belongs to a table. - /// - /// Original source lines for this row. - /// Table this Media row belongs to and should get its column definitions from. - public WixBundlePackageExitCodeRow(SourceLineNumber sourceLineNumbers, Table table) : - base(sourceLineNumbers, table) - { - } - - /// - /// Gets or sets the foreign key identifier to the ChainPackage row. - /// - public string ChainPackageId - { - get { return (string)this.Fields[0].Data; } - set { this.Fields[0].Data = value; } - } - - public int? Code - { - get { return (null == this.Fields[1].Data) ? (int?)null : (int?)this.Fields[1].Data; } - set { this.Fields[1].Data = value; } - } - - public ExitCodeBehaviorType Behavior - { - get { return (ExitCodeBehaviorType)this.Fields[2].Data; } - set { this.Fields[2].Data = (int)value; } - } - } -} diff --git a/src/WixToolset.Data/Rows/WixBundlePackageRow.cs b/src/WixToolset.Data/Rows/WixBundlePackageRow.cs deleted file mode 100644 index e278e9d8..00000000 --- a/src/WixToolset.Data/Rows/WixBundlePackageRow.cs +++ /dev/null @@ -1,226 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Data.Rows -{ - /// - /// Specialization of a row for the WixBundlePackage table. - /// - public sealed class WixBundlePackageRow : Row - { - /// - /// Creates a WixBundlePackage row that does not belong to a table. - /// - /// Original source lines for this row. - /// TableDefinition this row belongs to and should get its column definitions from. - public WixBundlePackageRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) : - base(sourceLineNumbers, tableDef) - { - } - - /// - /// Creates a WixBundlePackage row that belongs to a table. - /// - /// Original source lines for this row. - /// Table this row belongs to and should get its column definitions from. - public WixBundlePackageRow(SourceLineNumber sourceLineNumbers, Table table) : - base(sourceLineNumbers, table) - { - } - - /// - /// Gets or sets the foreign key to the WixChainItem. - /// - public string WixChainItemId - { - get { return (string)this.Fields[0].Data; } - set { this.Fields[0].Data = value; } - } - - /// - /// Gets or sets the item type. - /// - public WixBundlePackageType Type - { - get { return (WixBundlePackageType)this.Fields[1].Data; } - set { this.Fields[1].Data = (int)value; } - } - - /// - /// Gets or sets the indentifier of the package's payload. - /// - public string PackagePayload - { - get { return (string)this.Fields[2].Data; } - set { this.Fields[2].Data = value; } - } - - /// - /// Gets or sets the raw attributes of a package. - /// - public WixBundlePackageAttributes Attributes - { - get { return (WixBundlePackageAttributes)this.Fields[3].Data; } - set { this.Fields[3].Data = value; } - } - - /// - /// Gets or sets the install condition of the package. - /// - public string InstallCondition - { - get { return (string)this.Fields[4].Data; } - set { this.Fields[4].Data = value; } - } - - /// - /// Gets or sets the language of the package. - /// - public YesNoAlwaysType Cache - { - get { return (null == this.Fields[5].Data) ? YesNoAlwaysType.NotSet : (YesNoAlwaysType)this.Fields[5].Data; } - set { this.Fields[5].Data = (int)value; } - } - - /// - /// Gets or sets the indentifier of the package's cache. - /// - public string CacheId - { - get { return (string)this.Fields[6].Data; } - set { this.Fields[6].Data = value; } - } - - /// - /// Gets or sets whether the package is vital. - /// - public YesNoType Vital - { - get { return (null == this.Fields[7].Data) ? YesNoType.NotSet : (YesNoType)this.Fields[7].Data; } - set { this.Fields[7].Data = (int)value; } - } - - /// - /// Gets or sets whether the package is per-machine. - /// - public YesNoDefaultType PerMachine - { - get { return (null == this.Fields[8].Data) ? YesNoDefaultType.NotSet : (YesNoDefaultType)this.Fields[8].Data; } - set { this.Fields[8].Data = (int)value; } - } - - /// - /// Gets or sets the variable that points to the log for the package. - /// - public string LogPathVariable - { - get { return (string)this.Fields[9].Data; } - set { this.Fields[9].Data = value; } - } - - /// - /// Gets or sets the variable that points to the rollback log for the package. - /// - public string RollbackLogPathVariable - { - get { return (string)this.Fields[10].Data; } - set { this.Fields[10].Data = value; } - } - - /// - /// Gets or sets the size of the package. - /// - public long Size - { - get { return (long)this.Fields[11].Data; } - set { this.Fields[11].Data = value; } - } - - /// - /// Gets or sets the install size of the package. - /// - public long? InstallSize - { - get { return (long?)this.Fields[12].Data; } - set { this.Fields[12].Data = value; } - } - - /// - /// Gets or sets the version of the package. - /// - public string Version - { - get { return (string)this.Fields[13].Data; } - set { this.Fields[13].Data = value; } - } - - /// - /// Gets or sets the language of the package. - /// - public int Language - { - get { return (int)this.Fields[14].Data; } - set { this.Fields[14].Data = value; } - } - - /// - /// Gets or sets the display name of the package. - /// - public string DisplayName - { - get { return (string)this.Fields[15].Data; } - set { this.Fields[15].Data = value; } - } - - /// - /// Gets or sets the description of the package. - /// - public string Description - { - get { return (string)this.Fields[16].Data; } - set { this.Fields[16].Data = value; } - } - - /// - /// Gets or sets the rollback boundary identifier for the package. - /// - public string RollbackBoundary - { - get { return (string)this.Fields[17].Data; } - set { this.Fields[17].Data = value; } - } - - /// - /// Gets or sets the backward rollback boundary identifier for the package. - /// - public string RollbackBoundaryBackward - { - get { return (string)this.Fields[18].Data; } - set { this.Fields[18].Data = value; } - } - - /// - /// Gets or sets whether the package is x64. - /// - public YesNoType x64 - { - get { return (null == this.Fields[19].Data) ? YesNoType.NotSet : (YesNoType)this.Fields[19].Data; } - set { this.Fields[19].Data = (int)value; } - } - - /// - /// Gets whether the package is permanent. - /// - public bool Permanent - { - get { return 0 != (this.Attributes & WixBundlePackageAttributes.Permanent); } - } - - /// - /// Gets whether the package is visible. - /// - public bool Visible - { - get { return 0 != (this.Attributes & WixBundlePackageAttributes.Visible); } - } - } -} diff --git a/src/WixToolset.Data/Rows/WixBundlePackageType.cs b/src/WixToolset.Data/Rows/WixBundlePackageType.cs deleted file mode 100644 index a4277a8a..00000000 --- a/src/WixToolset.Data/Rows/WixBundlePackageType.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Data.Rows -{ - /// - /// Types of bundle packages. - /// - public enum WixBundlePackageType - { - Exe, - Msi, - Msp, - Msu, - } -} diff --git a/src/WixToolset.Data/Rows/WixBundlePatchTargetCodeRow.cs b/src/WixToolset.Data/Rows/WixBundlePatchTargetCodeRow.cs deleted file mode 100644 index e25f4a55..00000000 --- a/src/WixToolset.Data/Rows/WixBundlePatchTargetCodeRow.cs +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Data.Rows -{ - using System; - using System.Collections.Generic; - using System.Text; - - /// - /// Attributes for the PatchTargetCode table. - /// - [Flags] - public enum WixBundlePatchTargetCodeAttributes : int - { - None = 0, - - /// - /// The transform targets a specific ProductCode. - /// - TargetsProductCode = 1, - - /// - /// The transform targets a specific UpgradeCode. - /// - TargetsUpgradeCode = 2, - } - - /// - /// Specialization of a row for the PatchTargetCode table. - /// - public class WixBundlePatchTargetCodeRow : Row - { - /// - /// Creates a PatchTargetCodeRow row that does not belong to a table. - /// - /// Original source lines for this row. - /// TableDefinition this PatchTargetCode row belongs to and should get its column definitions from. - public WixBundlePatchTargetCodeRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) : - base(sourceLineNumbers, tableDef) - { - } - - /// - /// Creates a PatchTargetCodeRow row that belongs to a table. - /// - /// Original source lines for this row. - /// Table this PatchTargetCode row belongs to and should get its column definitions from. - public WixBundlePatchTargetCodeRow(SourceLineNumber sourceLineNumbers, Table table) : - base(sourceLineNumbers, table) - { - } - - public string MspPackageId - { - get { return (string)this.Fields[0].Data; } - set { this.Fields[0].Data = value; } - } - - public string TargetCode - { - get { return (string)this.Fields[1].Data; } - set { this.Fields[1].Data = value; } - } - - public WixBundlePatchTargetCodeAttributes Attributes - { - get { return (WixBundlePatchTargetCodeAttributes)this.Fields[2].Data; } - set { this.Fields[2].Data = (int)value; } - } - - public bool TargetsProductCode - { - get { return 0 != (WixBundlePatchTargetCodeAttributes.TargetsProductCode & this.Attributes); } - } - - public bool TargetsUpgradeCode - { - get { return 0 != (WixBundlePatchTargetCodeAttributes.TargetsUpgradeCode & this.Attributes); } - } - } -} diff --git a/src/WixToolset.Data/Rows/WixBundlePayloadRow.cs b/src/WixToolset.Data/Rows/WixBundlePayloadRow.cs deleted file mode 100644 index 8aac8aa0..00000000 --- a/src/WixToolset.Data/Rows/WixBundlePayloadRow.cs +++ /dev/null @@ -1,185 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Data.Rows -{ - using System; - using System.IO; - - /// - /// Specialization of a row for the PayloadInfo table. - /// - public class WixBundlePayloadRow : Row - { - /// - /// Creates a PayloadRow row that does not belong to a table. - /// - /// Original source lines for this row. - /// TableDefinition this Media row belongs to and should get its column definitions from. - public WixBundlePayloadRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) : - base(sourceLineNumbers, tableDef) - { - } - - /// - /// Creates a PayloadRow row that belongs to a table. - /// - /// Original source lines for this row. - /// Table this Media row belongs to and should get its column definitions from. - public WixBundlePayloadRow(SourceLineNumber sourceLineNumbers, Table table) : - base(sourceLineNumbers, table) - { - } - - public string Id - { - get { return (string)this.Fields[0].Data; } - set { this.Fields[0].Data = value; } - } - - public string Name - { - get { return (string)this.Fields[1].Data; } - set { this.Fields[1].Data = value; } - } - - public string SourceFile - { - get { return (string)this.Fields[2].Data; } - set { this.Fields[2].Data = value; } - } - - public string DownloadUrl - { - get { return (string)this.Fields[3].Data; } - set { this.Fields[3].Data = value; } - } - - public YesNoDefaultType Compressed - { - get { return (YesNoDefaultType)this.Fields[4].Data; } - set { this.Fields[4].Data = (int)value; } - } - - public string UnresolvedSourceFile - { - get { return (string)this.Fields[5].Data; } - set { this.Fields[5].Data = value; } - } - - public string DisplayName - { - get { return (string)this.Fields[6].Data; } - set { this.Fields[6].Data = value; } - } - - public string Description - { - get { return (string)this.Fields[7].Data; } - set { this.Fields[7].Data = value; } - } - - public bool EnableSignatureValidation - { - get { return (null != this.Fields[8].Data) && (1 == (int)this.Fields[8].Data); } - set { this.Fields[8].Data = value ? 1 : 0; } - } - - public int FileSize - { - get { return (int)this.Fields[9].Data; } - set { this.Fields[9].Data = value; } - } - - public string Version - { - get { return (string)this.Fields[10].Data; } - set { this.Fields[10].Data = value; } - } - - public string Hash - { - get { return (string)this.Fields[11].Data; } - set { this.Fields[11].Data = value; } - } - - public string PublicKey - { - get { return (string)this.Fields[12].Data; } - set { this.Fields[12].Data = value; } - } - - public string Thumbprint - { - get { return (string)this.Fields[13].Data; } - set { this.Fields[13].Data = value; } - } - - public string Catalog - { - get { return (string)this.Fields[14].Data; } - set { this.Fields[14].Data = value; } - } - - public string Container - { - get { return (string)this.Fields[15].Data; } - set { this.Fields[15].Data = value; } - } - - public string Package - { - get { return (string)this.Fields[16].Data; } - set { this.Fields[16].Data = value; } - } - - public bool ContentFile - { - get { return (null != this.Fields[17].Data) && (1 == (int)this.Fields[17].Data); } - set { this.Fields[17].Data = value ? 1 : 0; } - } - - public string EmbeddedId - { - get { return (string)this.Fields[18].Data; } - set { this.Fields[18].Data = value; } - } - - public bool LayoutOnly - { - get { return (null != this.Fields[19].Data) && (1 == (int)this.Fields[19].Data); } - set { this.Fields[19].Data = value ? 1 : 0; } - } - - public PackagingType Packaging - { - get - { - object data = this.Fields[20].Data; - return (null == data) ? PackagingType.Unknown : (PackagingType)data; - } - - set - { - if (PackagingType.Unknown == value) - { - this.Fields[20].Data = null; - } - else - { - this.Fields[20].Data = (int)value; - } - } - } - - public string ParentPackagePayload - { - get { return (string)this.Fields[21].Data; } - set { this.Fields[21].Data = value; } - } - - public string FullFileName - { - get { return String.IsNullOrEmpty(this.SourceFile) ? String.Empty : Path.GetFullPath(this.SourceFile); } - } - } -} diff --git a/src/WixToolset.Data/Rows/WixBundleRelatedPackageRow.cs b/src/WixToolset.Data/Rows/WixBundleRelatedPackageRow.cs deleted file mode 100644 index ea9ff99e..00000000 --- a/src/WixToolset.Data/Rows/WixBundleRelatedPackageRow.cs +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Data.Rows -{ - /// - /// Specialization of a row for the RelatedPackage table. - /// - public class WixBundleRelatedPackageRow : Row - { - /// - /// Creates a RelatedPackageRow row that does not belong to a table. - /// - /// Original source lines for this row. - /// TableDefinition this Media row belongs to and should get its column definitions from. - public WixBundleRelatedPackageRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) : - base(sourceLineNumbers, tableDef) - { - } - - /// - /// Creates a RelatedPackageRow row that belongs to a table. - /// - /// Original source lines for this row. - /// Table this Media row belongs to and should get its column definitions from. - public WixBundleRelatedPackageRow(SourceLineNumber sourceLineNumbers, Table table) : - base(sourceLineNumbers, table) - { - } - - /// - /// Gets or sets the foreign key identifier to the ChainPackage row. - /// - public string ChainPackageId - { - get { return (string)this.Fields[0].Data; } - set { this.Fields[0].Data = value; } - } - - public string Id - { - get { return (string)this.Fields[1].Data; } - set { this.Fields[1].Data = value; } - } - - public string MinVersion - { - get { return (string)this.Fields[2].Data; } - set { this.Fields[2].Data = value; } - } - - public string MaxVersion - { - get { return (string)this.Fields[3].Data; } - set { this.Fields[3].Data = value; } - } - - public string Languages - { - get { return (string)this.Fields[4].Data; } - set { this.Fields[4].Data = value; } - } - - public bool MinInclusive - { - get { return 1 == (int)this.Fields[5].Data; } - set { this.Fields[5].Data = value ? 1 : 0; } - } - - public bool MaxInclusive - { - get { return 1 == (int)this.Fields[6].Data; } - set { this.Fields[6].Data = value ? 1 : 0; } - } - - public bool LangInclusive - { - get { return 1 == (int)this.Fields[7].Data; } - set { this.Fields[7].Data = value ? 1 : 0; } - } - - public bool OnlyDetect - { - get { return 1 == (int)this.Fields[8].Data; } - set { this.Fields[8].Data = value ? 1 : 0; } - } - } -} diff --git a/src/WixToolset.Data/Rows/WixBundleRollbackBoundaryRow.cs b/src/WixToolset.Data/Rows/WixBundleRollbackBoundaryRow.cs deleted file mode 100644 index d0a994c0..00000000 --- a/src/WixToolset.Data/Rows/WixBundleRollbackBoundaryRow.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Data.Rows -{ - /// - /// Specialization of a row for the WixBundleRollbackBoundary table. - /// - public sealed class WixBundleRollbackBoundaryRow : Row - { - /// - /// Creates a WixBundleRollbackBoundary row that does not belong to a table. - /// - /// Original source lines for this row. - /// TableDefinition this row belongs to and should get its column definitions from. - public WixBundleRollbackBoundaryRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) : - base(sourceLineNumbers, tableDef) - { - } - - /// - /// Creates a RollbackBoundaryRow row that belongs to a table. - /// - /// Original source lines for this row. - /// Table this row belongs to and should get its column definitions from. - public WixBundleRollbackBoundaryRow(SourceLineNumber sourceLineNumbers, Table table) : - base(sourceLineNumbers, table) - { - } - - /// - /// Gets or sets the foreign key identifier to the ChainPackage row. - /// - public string ChainPackageId - { - get { return (string)this.Fields[0].Data; } - set { this.Fields[0].Data = value; } - } - - /// - /// Gets or sets whether the package is vital. - /// - /// Vitality of the package. - public YesNoType Vital - { - get { return (null == this.Fields[1].Data) ? YesNoType.NotSet : (YesNoType)this.Fields[1].Data; } - set { this.Fields[1].Data = (int)value; } - } - - /// - /// Gets or sets whether the rollback-boundary should be installed as an MSI transaction. - /// - /// Vitality of the package. - public YesNoType Transaction - { - get { return (null == this.Fields[2].Data) ? YesNoType.NotSet : (YesNoType)this.Fields[2].Data; } - set { this.Fields[2].Data = (int)value; } - } - } -} diff --git a/src/WixToolset.Data/Rows/WixBundleRow.cs b/src/WixToolset.Data/Rows/WixBundleRow.cs deleted file mode 100644 index 4c96d6cc..00000000 --- a/src/WixToolset.Data/Rows/WixBundleRow.cs +++ /dev/null @@ -1,228 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Data.Rows -{ - using System; - - /// - /// Bundle info for binding Bundles. - /// - public class WixBundleRow : Row - { - /// - /// Creates a WixBundleRow row that does not belong to a table. - /// - /// Original source lines for this row. - /// TableDefinition this WixBundleRow row belongs to and should get its column definitions from. - public WixBundleRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) : - base(sourceLineNumbers, tableDef) - { - } - - /// - /// Creates a WixBundleRow row that belongs to a table. - /// - /// Original source lines for this row. - /// Table this WixBundleRow row belongs to and should get its column definitions from. - public WixBundleRow(SourceLineNumber sourceLineNumbers, Table table) : - base(sourceLineNumbers, table) - { - } - - public string Version - { - get { return (string)this.Fields[0].Data; } - set { this.Fields[0].Data = value; } - } - - public string Copyright - { - get { return (string)this.Fields[1].Data; } - set { this.Fields[1].Data = value; } - } - - public string Name - { - get { return (string)this.Fields[2].Data; } - set { this.Fields[2].Data = value; } - } - - public string AboutUrl - { - get { return (string)this.Fields[3].Data; } - set { this.Fields[3].Data = value; } - } - - public int DisableModify - { - get { return (null == this.Fields[4].Data) ? 0 : (int)this.Fields[4].Data; } - set { this.Fields[4].Data = value; } - } - - public bool DisableRemove - { - get { return (null != this.Fields[5].Data && 0 != (int)this.Fields[5].Data); } - set { this.Fields[5].Data = value ? 1 : 0; } - } - - // There is no 6. It used to be DisableRepair. - - public string HelpTelephone - { - get { return (string)this.Fields[7].Data; } - set { this.Fields[7].Data = value; } - } - - public string HelpLink - { - get { return (string)this.Fields[8].Data; } - set { this.Fields[8].Data = value; } - } - - public string Publisher - { - get { return (string)this.Fields[9].Data; } - set { this.Fields[9].Data = value; } - } - - public string UpdateUrl - { - get { return (string)this.Fields[10].Data; } - set { this.Fields[10].Data = value; } - } - - public YesNoDefaultType Compressed - { - get { return (null == this.Fields[11].Data) ? YesNoDefaultType.Default : (0 == (int)this.Fields[11].Data) ? YesNoDefaultType.No : YesNoDefaultType.Yes; } - set { this.Fields[11].Data = (int)value; } - } - - public PackagingType DefaultPackagingType - { - get { return (YesNoDefaultType.No == this.Compressed) ? PackagingType.External : PackagingType.Embedded; } - } - - public string LogPathPrefixExtension - { - get { return (string)this.Fields[12].Data ?? String.Empty; } - set { this.Fields[12].Data = value; } - } - - public string LogPathVariable - { - get - { - string[] logVariableAndPrefixExtension = this.LogPathPrefixExtension.Split(':'); - return logVariableAndPrefixExtension[0]; - } - } - - public string LogPrefix - { - get - { - string[] logVariableAndPrefixExtension = this.LogPathPrefixExtension.Split(':'); - if (2 > logVariableAndPrefixExtension.Length) - { - return String.Empty; - } - string logPrefixAndExtension = logVariableAndPrefixExtension[1]; - int extensionIndex = logPrefixAndExtension.LastIndexOf('.'); - return logPrefixAndExtension.Substring(0, extensionIndex); - } - } - - public string LogExtension - { - get - { - string[] logVariableAndPrefixExtension = this.LogPathPrefixExtension.Split(':'); - if (2 > logVariableAndPrefixExtension.Length) - { - return String.Empty; - } - string logPrefixAndExtension = logVariableAndPrefixExtension[1]; - int extensionIndex = logPrefixAndExtension.LastIndexOf('.'); - return logPrefixAndExtension.Substring(extensionIndex + 1); - } - } - - public string IconPath - { - get { return (string)this.Fields[13].Data; } - set { this.Fields[13].Data = value; } - } - - public string SplashScreenBitmapPath - { - get { return (string)this.Fields[14].Data; } - set { this.Fields[14].Data = value; } - } - - public string Condition - { - get { return (string)this.Fields[15].Data; } - set { this.Fields[15].Data = value; } - } - - public string Tag - { - get { return (string)this.Fields[16].Data; } - set { this.Fields[16].Data = value; } - } - - public Platform Platform - { - get { return (Platform)Enum.Parse(typeof(Platform), (string)this.Fields[17].Data); } - set { this.Fields[17].Data = value.ToString(); } - } - - public string ParentName - { - get { return (string)this.Fields[18].Data; } - set { this.Fields[18].Data = value; } - } - - public string UpgradeCode - { - get { return (string)this.Fields[19].Data; } - set { this.Fields[19].Data = value; } - } - - public Guid BundleId - { - get - { - if (null == this.Fields[20].Data) - { - this.Fields[20].Data = Guid.NewGuid().ToString("B"); - } - - return new Guid((string)this.Fields[20].Data); - } - - set { this.Fields[20].Data = value.ToString(); } - } - - public string ProviderKey - { - get - { - if (null == this.Fields[21].Data) - { - this.Fields[21].Data = this.BundleId.ToString("B"); - } - - return (string)this.Fields[21].Data; - } - - set { this.Fields[21].Data = value; } - } - - public bool PerMachine - { - get { return (null != this.Fields[22].Data && 0 != (int)this.Fields[22].Data); } - set { this.Fields[22].Data = value ? 1 : 0; } - } - } -} diff --git a/src/WixToolset.Data/Rows/WixBundleSlipstreamMspRow.cs b/src/WixToolset.Data/Rows/WixBundleSlipstreamMspRow.cs deleted file mode 100644 index d11b23ef..00000000 --- a/src/WixToolset.Data/Rows/WixBundleSlipstreamMspRow.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Data.Rows -{ - /// - /// Specialization of a row for the SlipstreamMsp table. - /// - public class WixBundleSlipstreamMspRow : Row - { - /// - /// Creates a SlipstreamMspRow row that does not belong to a table. - /// - /// Original source lines for this row. - /// TableDefinition this Media row belongs to and should get its column definitions from. - public WixBundleSlipstreamMspRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) : - base(sourceLineNumbers, tableDef) - { - } - - /// - /// Creates a SlipstreamMspRow row that belongs to a table. - /// - /// Original source lines for this row. - /// Table this Media row belongs to and should get its column definitions from. - public WixBundleSlipstreamMspRow(SourceLineNumber sourceLineNumbers, Table table) : - base(sourceLineNumbers, table) - { - } - - /// - /// Gets or sets the foreign key identifier to the ChainPackage row. - /// - public string ChainPackageId - { - get { return (string)this.Fields[0].Data; } - set { this.Fields[0].Data = value; } - } - - /// - /// Gets or sets the foreign key identifier to the ChainPackage row for the MSP package. - /// - public string MspPackageId - { - get { return (string)this.Fields[1].Data; } - set { this.Fields[1].Data = value; } - } - } -} diff --git a/src/WixToolset.Data/Rows/WixBundleUpdateRow.cs b/src/WixToolset.Data/Rows/WixBundleUpdateRow.cs deleted file mode 100644 index e0150685..00000000 --- a/src/WixToolset.Data/Rows/WixBundleUpdateRow.cs +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Data.Rows -{ - using System; - - /// - /// Bundle update info for binding Bundles. - /// - public class WixBundleUpdateRow : Row - { - /// - /// Creates a WixBundleUpdateRow row that does not belong to a table. - /// - /// Original source lines for this row. - /// TableDefinition this WixBundleUpdateRow row belongs to and should get its column definitions from. - public WixBundleUpdateRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) : - base(sourceLineNumbers, tableDef) - { - } - - /// - /// Creates a WixBundleUpdateRow row that belongs to a table. - /// - /// Original source lines for this row. - /// Table this WixBundleUpdateRow row belongs to and should get its column definitions from. - public WixBundleUpdateRow(SourceLineNumber sourceLineNumbers, Table table) : - base(sourceLineNumbers, table) - { - } - - public string Location - { - get { return (string)this.Fields[0].Data; } - set { this.Fields[0].Data = value; } - } - } -} diff --git a/src/WixToolset.Data/Rows/WixBundleVariableRow.cs b/src/WixToolset.Data/Rows/WixBundleVariableRow.cs deleted file mode 100644 index e7ff1a4d..00000000 --- a/src/WixToolset.Data/Rows/WixBundleVariableRow.cs +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Data.Rows -{ - /// - /// Specialization of a row for the Variable table. - /// - public sealed class WixBundleVariableRow : Row - { - /// - /// Creates a Variable row that does not belong to a table. - /// - /// Original source lines for this row. - /// TableDefinition this Media row belongs to and should get its column definitions from. - public WixBundleVariableRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) : - base(sourceLineNumbers, tableDef) - { - } - - /// - /// Creates a Variable row that belongs to a table. - /// - /// Original source lines for this row. - /// Table this Media row belongs to and should get its column definitions from. - public WixBundleVariableRow(SourceLineNumber sourceLineNumbers, Table table) - : base(sourceLineNumbers, table) - { - } - - /// - /// Gets or sets the variable identifier. - /// - /// The variable identifier. - public string Id - { - get { return (string)this.Fields[0].Data; } - set { this.Fields[0].Data = value; } - } - - /// - /// Gets or sets the variable's value. - /// - /// The variable's value. - public string Value - { - get { return (string)this.Fields[1].Data; } - set { this.Fields[1].Data = value; } - } - - /// - /// Gets or sets the variable's type. - /// - /// The variable's type. - public string Type - { - get { return (string)this.Fields[2].Data; } - set { this.Fields[2].Data = value; } - } - - /// - /// Gets or sets whether this variable is hidden. - /// - /// Whether this variable is hidden. - public bool Hidden - { - get { return (null == this.Fields[3].Data || 0 == ((int)this.Fields[3].Data)) ? false : true; } - set { this.Fields[3].Data = value ? 1 : 0; } - } - - /// - /// Gets or sets whether this variable is persisted. - /// - /// Whether this variable is persisted. - public bool Persisted - { - get { return (null == this.Fields[4].Data || 0 == ((int)this.Fields[4].Data)) ? false : true; } - set { this.Fields[4].Data = value ? 1 : 0; } - } - } -} diff --git a/src/WixToolset.Data/Rows/WixChainAttributes.cs b/src/WixToolset.Data/Rows/WixChainAttributes.cs deleted file mode 100644 index 017505bc..00000000 --- a/src/WixToolset.Data/Rows/WixChainAttributes.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Data.Rows -{ - using System; - - [Flags] - public enum WixChainAttributes - { - None = 0x0, - DisableRollback = 0x1, - DisableSystemRestore = 0x2, - ParallelCache = 0x4, - } -} diff --git a/src/WixToolset.Data/Rows/WixChainItemRow.cs b/src/WixToolset.Data/Rows/WixChainItemRow.cs deleted file mode 100644 index 12538d71..00000000 --- a/src/WixToolset.Data/Rows/WixChainItemRow.cs +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Data.Rows -{ - /// - /// Specialization of a row for the WixChainItem table. - /// - public sealed class WixChainItemRow : Row - { - /// - /// Creates a WixChainItem row that does not belong to a table. - /// - /// Original source lines for this row. - /// TableDefinition this ChainItem row belongs to and should get its column definitions from. - public WixChainItemRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) : - base(sourceLineNumbers, tableDef) - { - } - - /// - /// Creates a WixChainItem row that belongs to a table. - /// - /// Original source lines for this row. - /// Table this ChainItem row belongs to and should get its column definitions from. - public WixChainItemRow(SourceLineNumber sourceLineNumbers, Table table) - : base(sourceLineNumbers, table) - { - } - - /// - /// Gets or sets the WixChainItem identifier. - /// - public string Id - { - get { return (string)this.Fields[0].Data; } - set { this.Fields[0].Data = value; } - } - } -} diff --git a/src/WixToolset.Data/Rows/WixChainRow.cs b/src/WixToolset.Data/Rows/WixChainRow.cs deleted file mode 100644 index 94600efa..00000000 --- a/src/WixToolset.Data/Rows/WixChainRow.cs +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Data.Rows -{ - /// - /// Specialization of a row for the WixChain table. - /// - public sealed class WixChainRow : Row - { - /// - /// Creates a WixChain row that does not belong to a table. - /// - /// Original source lines for this row. - /// TableDefinition this row belongs to and should get its column definitions from. - public WixChainRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) : - base(sourceLineNumbers, tableDef) - { - } - - /// - /// Creates a WixChainRow row that belongs to a table. - /// - /// Original source lines for this row. - /// Table this row belongs to and should get its column definitions from. - public WixChainRow(SourceLineNumber sourceLineNumbers, Table table) : - base(sourceLineNumbers, table) - { - } - - /// - /// Gets or sets the raw chain attributes. - /// - public WixChainAttributes Attributes - { - get { return (WixChainAttributes)this.Fields[0].Data; } - set { this.Fields[0].Data = value; } - } - - /// - /// Gets the disable rollback state of a chain. - /// - public bool DisableRollback - { - get { return 0 != (this.Attributes & WixChainAttributes.DisableRollback); } - } - - /// - /// Gets disable system restore state of a chain. - /// - public bool DisableSystemRestore - { - get { return 0 != (this.Attributes & WixChainAttributes.DisableSystemRestore); } - } - - /// - /// Gets parallel cache of a chain. - /// - public bool ParallelCache - { - get { return 0 != (this.Attributes & WixChainAttributes.ParallelCache); } - } - } -} diff --git a/src/WixToolset.Data/Rows/WixComplexReferenceRow.cs b/src/WixToolset.Data/Rows/WixComplexReferenceRow.cs deleted file mode 100644 index b516c5e9..00000000 --- a/src/WixToolset.Data/Rows/WixComplexReferenceRow.cs +++ /dev/null @@ -1,208 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Data.Rows -{ - using System; - using System.Diagnostics; - using System.Diagnostics.CodeAnalysis; - using System.Xml; - - /// - /// Specialization of a row for the WixComplexReference table. - /// - public sealed class WixComplexReferenceRow : Row, IComparable - { - /// - /// Creates a WixComplexReferenceRow row that belongs to a table. - /// - /// Original source lines for this row. - /// Table this row belongs to and should get its column definitions from. - public WixComplexReferenceRow(SourceLineNumber sourceLineNumbers, Table table) - : base(sourceLineNumbers, table) - { - } - - /// - /// Gets the parent type of the complex reference. - /// - /// Parent type of the complex reference. - public ComplexReferenceParentType ParentType - { - get { return (ComplexReferenceParentType)Enum.ToObject(typeof(ComplexReferenceParentType), (int)this.Fields[1].Data); } - set { this.Fields[1].Data = (int)value; } - } - - /// - /// Gets or sets the parent identifier of the complex reference. - /// - /// Parent identifier of the complex reference. - public string ParentId - { - get { return (string)this.Fields[0].Data; } - set { this.Fields[0].Data = value; } - } - - /// - /// Gets the parent language of the complex reference. - /// - /// Parent language of the complex reference. - public string ParentLanguage - { - get { return (string)this.Fields[2].Data; } - set { this.Fields[2].Data = value; } - } - - /// - /// Gets the child type of the complex reference. - /// - /// Child type of the complex reference. - public ComplexReferenceChildType ChildType - { - get { return (ComplexReferenceChildType)Enum.ToObject(typeof(ComplexReferenceChildType), (int)this.Fields[4].Data); } - set { this.Fields[4].Data = (int)value; } - } - - /// - /// Gets the child identifier of the complex reference. - /// - /// Child identifier of the complex reference. - public string ChildId - { - get { return (string)this.Fields[3].Data; } - set { this.Fields[3].Data = value; } - } - - /// - /// Gets if this is the primary complex reference. - /// - /// true if primary complex reference. - public bool IsPrimary - { - get - { - return (0x1 == ((int)this.Fields[5].Data & 0x1)); - } - - set - { - if (null == this.Fields[5].Data) - { - this.Fields[5].Data = 0; - } - - if (value) - { - this.Fields[5].Data = (int)this.Fields[5].Data | 0x1; - } - else - { - this.Fields[5].Data = (int)this.Fields[5].Data & ~0x1; - } - } - } - - /// - /// Determines if two complex references are equivalent. - /// - /// Complex reference to compare. - /// True if complex references are equivalent. - public override bool Equals(object obj) - { - return 0 == this.CompareTo(obj); - } - - /// - /// Gets the hash code for the complex reference. - /// - /// Hash code for the complex reference. - public override int GetHashCode() - { - return this.ChildType.GetHashCode() ^ this.ChildId.GetHashCode() ^ this.ParentType.GetHashCode() ^ this.ParentLanguage.GetHashCode() ^ this.ParentId.GetHashCode() ^ this.IsPrimary.GetHashCode(); - } - - /// - /// Compares two complex references. - /// - /// Complex reference to compare to. - /// Zero if the objects are equivalent, negative number if the provided object is less, positive if greater. - public int CompareTo(object obj) - { - int comparison = this.CompareToWithoutConsideringPrimary(obj); - if (0 == comparison) - { - comparison = ((WixComplexReferenceRow)obj).IsPrimary.CompareTo(this.IsPrimary); // Note: the order of these is purposely switched to ensure that "Yes" is lower than "No" and "NotSet" - } - return comparison; - } - - /// - /// Compares two complex references without considering the primary bit. - /// - /// Complex reference to compare to. - /// Zero if the objects are equivalent, negative number if the provided object is less, positive if greater. - [SuppressMessage("Microsoft.Globalization", "CA1303:DoNotPassLiteralsAsLocalizedParameters", MessageId = "System.ArgumentException.#ctor(System.String,System.String)")] - public int CompareToWithoutConsideringPrimary(object obj) - { - WixComplexReferenceRow other = obj as WixComplexReferenceRow; - if (null == other) - { - throw new ArgumentException(WixDataStrings.EXP_ExpectedComplexReferenceType, "obj"); - } - - int comparison = this.ChildType - other.ChildType; - if (0 == comparison) - { - comparison = String.Compare(this.ChildId, other.ChildId, StringComparison.Ordinal); - if (0 == comparison) - { - comparison = this.ParentType - other.ParentType; - if (0 == comparison) - { - string thisParentLanguage = null == this.ParentLanguage ? String.Empty : this.ParentLanguage; - string otherParentLanguage = null == other.ParentLanguage ? String.Empty : other.ParentLanguage; - comparison = String.Compare(thisParentLanguage, otherParentLanguage, StringComparison.Ordinal); - if (0 == comparison) - { - comparison = String.Compare(this.ParentId, other.ParentId, StringComparison.Ordinal); - } - } - } - } - - return comparison; - } - - /// - /// Creates a shallow copy of the ComplexReference. - /// - /// A shallow copy of the ComplexReference. - public WixComplexReferenceRow Clone() - { - WixComplexReferenceRow wixComplexReferenceRow = new WixComplexReferenceRow(this.SourceLineNumbers, this.Table); - wixComplexReferenceRow.ParentType = this.ParentType; - wixComplexReferenceRow.ParentId = this.ParentId; - wixComplexReferenceRow.ParentLanguage = this.ParentLanguage; - wixComplexReferenceRow.ChildType = this.ChildType; - wixComplexReferenceRow.ChildId = this.ChildId; - wixComplexReferenceRow.IsPrimary = this.IsPrimary; - - return wixComplexReferenceRow; - } - - /// - /// Changes all of the parent references to point to the passed in parent reference. - /// - /// New parent complex reference. - public void Reparent(WixComplexReferenceRow parent) - { - this.ParentId = parent.ParentId; - this.ParentLanguage = parent.ParentLanguage; - this.ParentType = parent.ParentType; - - if (!this.IsPrimary) - { - this.IsPrimary = parent.IsPrimary; - } - } - } -} diff --git a/src/WixToolset.Data/Rows/WixDeltaPatchFileRow.cs b/src/WixToolset.Data/Rows/WixDeltaPatchFileRow.cs deleted file mode 100644 index 000779d9..00000000 --- a/src/WixToolset.Data/Rows/WixDeltaPatchFileRow.cs +++ /dev/null @@ -1,142 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Data.Rows -{ - /// - /// Specialization of a row for the WixDeltaPatchFile table. - /// - public sealed class WixDeltaPatchFileRow : Row - { - /// - /// Creates a WixDeltaPatchFile row that does not belong to a table. - /// - /// Original source lines for this row. - /// TableDefinition this Media row belongs to and should get its column definitions from. - public WixDeltaPatchFileRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) : - base(sourceLineNumbers, tableDef) - { - } - - /// - /// Creates a WixDeltaPatchFile row that belongs to a table. - /// - /// Original source lines for this row. - /// Table this File row belongs to and should get its column definitions from. - public WixDeltaPatchFileRow(SourceLineNumber sourceLineNumbers, Table table) : - base(sourceLineNumbers, table) - { - } - - /// - /// Gets or sets the primary key of the file row. - /// - /// Primary key of the file row. - public string File - { - get { return (string)this.Fields[0].Data; } - set { this.Fields[0].Data = value; } - } - - /// - /// Gets or sets the delta patch retain-length list for the file. - /// - /// RetainLength list for the file. - public string RetainLengths - { - get { return (string)this.Fields[1].Data; } - set { this.Fields[1].Data = value; } - } - - /// - /// Gets or sets the previous delta patch retain-length list for the file. - /// - /// Previous RetainLength list for the file. - public string PreviousRetainLengths - { - get { return this.Fields[1].PreviousData; } - set { this.Fields[1].PreviousData = value; } - } - - /// - /// Gets or sets the delta patch ignore-offset list for the file. - /// - /// IgnoreOffset list for the file. - public string IgnoreOffsets - { - get { return (string)this.Fields[2].Data; } - set { this.Fields[2].Data = value; } - } - - /// - /// Gets or sets the previous delta patch ignore-offset list for the file. - /// - /// Previous IgnoreOffset list for the file. - public string PreviousIgnoreOffsets - { - get { return this.Fields[2].PreviousData; } - set { this.Fields[2].PreviousData = value; } - } - - /// - /// Gets or sets the delta patch ignore-length list for the file. - /// - /// IgnoreLength list for the file. - public string IgnoreLengths - { - get { return (string)this.Fields[3].Data; } - set { this.Fields[3].Data = value; } - } - - /// - /// Gets or sets the previous delta patch ignore-length list for the file. - /// - /// Previous IgnoreLength list for the file. - public string PreviousIgnoreLengths - { - get { return this.Fields[3].PreviousData; } - set { this.Fields[3].PreviousData = value; } - } - - /// - /// Gets or sets the delta patch retain-offset list for the file. - /// - /// RetainOffset list for the file. - public string RetainOffsets - { - get { return (string)this.Fields[4].Data; } - set { this.Fields[4].Data = value; } - } - - /// - /// Gets or sets the previous delta patch retain-offset list for the file. - /// - /// PreviousRetainOffset list for the file. - public string PreviousRetainOffsets - { - get { return this.Fields[4].PreviousData; } - set { this.Fields[4].PreviousData = value; } - } - - /// - /// Gets or sets the symbol paths for the file. - /// - /// SymbolPath list for the file. - /// This is set during binding. - public string Symbols - { - get { return (string)this.Fields[5].Data; } - set { this.Fields[5].Data = value; } - } - - /// - /// Gets or sets the previous symbol paths for the file. - /// - /// PreviousSymbolPath list for the file. - /// This is set during binding. - public string PreviousSymbols - { - get { return (string)this.Fields[5].PreviousData; } - set { this.Fields[5].PreviousData = value; } - } - } -} diff --git a/src/WixToolset.Data/Rows/WixDeltaPatchSymbolPathsRow.cs b/src/WixToolset.Data/Rows/WixDeltaPatchSymbolPathsRow.cs deleted file mode 100644 index b6c0b840..00000000 --- a/src/WixToolset.Data/Rows/WixDeltaPatchSymbolPathsRow.cs +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Data.Rows -{ - /// - /// Specialization of a row for the WixDeltaPatchSymbolPaths table. - /// - public sealed class WixDeltaPatchSymbolPathsRow : Row - { - /// - /// Creates a WixDeltaPatchSymbolPaths row that does not belong to a table. - /// - /// Original source lines for this row. - /// TableDefinition this row belongs to and should get its column definitions from. - public WixDeltaPatchSymbolPathsRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) : - base(sourceLineNumbers, tableDef) - { - } - - /// - /// Creates a WixDeltaPatchSymbolPaths row that belongs to a table. - /// - /// Original source lines for this row. - /// Table this row belongs to and should get its column definitions from. - public WixDeltaPatchSymbolPathsRow(SourceLineNumber sourceLineNumbers, Table table) : - base(sourceLineNumbers, table) - { - } - - /// - /// Gets or sets the identifier the symbol paths apply to. - /// - /// RetainLength list for the file. - public string Id - { - get { return (string)this.Fields[0].Data; } - set { this.Fields[0].Data = value; } - } - - /// - /// Gets or sets the type of the identifier. - /// - public SymbolPathType Type - { - get { return (SymbolPathType)this.Fields[1].AsInteger(); } - set { this.Fields[1].Data = value; } - } - - /// - /// Gets or sets the delta patch symbol paths. - /// - public string SymbolPaths - { - get { return (string)this.Fields[2].Data; } - set { this.Fields[2].Data = value; } - } - } -} diff --git a/src/WixToolset.Data/Rows/WixFileRow.cs b/src/WixToolset.Data/Rows/WixFileRow.cs deleted file mode 100644 index 52723f88..00000000 --- a/src/WixToolset.Data/Rows/WixFileRow.cs +++ /dev/null @@ -1,161 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Data.Rows -{ - /// - /// Specialization of a row for the WixFile table. - /// - public sealed class WixFileRow : Row - { - /// - /// Creates a WixFile row that does not belong to a table. - /// - /// Original source lines for this row. - /// TableDefinition this row belongs to and should get its column definitions from. - public WixFileRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) : - base(sourceLineNumbers, tableDef) - { - } - - /// - /// Creates a WixFile row that belongs to a table. - /// - /// Original source lines for this row. - /// Table this row belongs to and should get its column definitions from. - public WixFileRow(SourceLineNumber sourceLineNumbers, Table table) : - base(sourceLineNumbers, table) - { - } - - /// - /// Gets or sets the primary key of the file row. - /// - /// Primary key of the file row. - public string File - { - get { return (string)this.Fields[0].Data; } - set { this.Fields[0].Data = value; } - } - - /// - /// Gets or sets the assembly type of the file row. - /// - /// Assembly type of the file row. - public FileAssemblyType AssemblyType - { - get { return (null == this.Fields[1]) ? FileAssemblyType.NotAnAssembly : (FileAssemblyType)this.Fields[1].AsInteger(); } - set { this.Fields[1].Data = (int)value; } - } - - /// - /// Gets or sets the identifier for the assembly manifest. - /// - /// Identifier for the assembly manifest. - public string AssemblyManifest - { - get { return (string)this.Fields[2].Data; } - set { this.Fields[2].Data = value; } - } - - /// - /// Gets or sets the application for the assembly. - /// - /// Application for the assembly. - public string AssemblyApplication - { - get { return (string)this.Fields[3].Data; } - set { this.Fields[3].Data = value; } - } - - /// - /// Gets or sets the directory of the file. - /// - /// Directory of the file. - public string Directory - { - get { return (string)this.Fields[4].Data; } - set { this.Fields[4].Data = value; } - } - - /// - /// Gets or sets the disk id for this file. - /// - /// Disk id for the file. - public int DiskId - { - get { return (int)this.Fields[5].Data; } - set { this.Fields[5].Data = value; } - } - - /// - /// Gets or sets the source location to the file. - /// - /// Source location to the file. - public string Source - { - get { return (string)this.Fields[6].Data; } - set { this.Fields[6].Data = value; } - } - - /// - /// Gets or sets the source location to the file. - /// - /// Source location to the file. - public string PreviousSource - { - get { return (string)this.Fields[6].PreviousData; } - set { this.Fields[6].PreviousData = value; } - } - - /// - /// Gets or sets the architecture the file executes on. - /// - /// Architecture the file executes on. - public string ProcessorArchitecture - { - get { return (string)this.Fields[7].Data; } - set { this.Fields[7].Data = value; } - } - - /// - /// Gets or sets the patch group of a patch-added file. - /// - /// The patch group of a patch-added file. - public int PatchGroup - { - get { return (null == this.Fields[8].Data) ? 0 : (int)this.Fields[8].Data; } - set { this.Fields[8].Data = value; } - } - - /// - /// Gets or sets the attributes on a file. - /// - /// Attributes on a file. - public int Attributes - { - get { return (int)this.Fields[9].Data; } - set { this.Fields[9].Data = value; } - } - - /// - /// Gets or sets the patching attributes to the file. - /// - /// Patching attributes of the file. - public PatchAttributeType PatchAttributes - { - get { return (PatchAttributeType)this.Fields[10].AsInteger(); } - set { this.Fields[10].Data = (int)value; } - } - - /// - /// Gets or sets the path to the delta patch header. - /// - /// Patch header path. - /// Set by the binder only when doing delta patching. - public string DeltaPatchHeaderSource - { - get { return (string)this.Fields[11].Data; } - set { this.Fields[11].Data = value; } - } - } -} diff --git a/src/WixToolset.Data/Rows/WixGroupRow.cs b/src/WixToolset.Data/Rows/WixGroupRow.cs deleted file mode 100644 index d36338d1..00000000 --- a/src/WixToolset.Data/Rows/WixGroupRow.cs +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Data.Rows -{ - using System; - - /// - /// Specialization of a row for the WixGroup table. - /// - public sealed class WixGroupRow : Row - { - /// - /// Creates a WixGroupRow row that belongs to a table. - /// - /// Original source lines for this row. - /// Table this row belongs to and should get its column definitions from. - public WixGroupRow(SourceLineNumber sourceLineNumbers, Table table) - : base(sourceLineNumbers, table) - { - } - - /// - /// Gets or sets the parent identifier of the complex reference. - /// - /// Parent identifier of the complex reference. - public string ParentId - { - get { return (string)this.Fields[0].Data; } - set { this.Fields[0].Data = value; } - } - - /// - /// Gets the parent type of the complex reference. - /// - /// Parent type of the complex reference. - public ComplexReferenceParentType ParentType - { - get { return (ComplexReferenceParentType)Enum.Parse(typeof(ComplexReferenceParentType), (string)this.Fields[1].Data); } - set { this.Fields[1].Data = value.ToString(); } - } - - /// - /// Gets the child identifier of the complex reference. - /// - /// Child identifier of the complex reference. - public string ChildId - { - get { return (string)this.Fields[2].Data; } - set { this.Fields[2].Data = value; } - } - - /// - /// Gets the child type of the complex reference. - /// - /// Child type of the complex reference. - public ComplexReferenceChildType ChildType - { - get { return (ComplexReferenceChildType)Enum.Parse(typeof(ComplexReferenceChildType), (string)this.Fields[3].Data); } - set { this.Fields[3].Data = value.ToString(); } - } - } -} diff --git a/src/WixToolset.Data/Rows/WixMediaRow.cs b/src/WixToolset.Data/Rows/WixMediaRow.cs deleted file mode 100644 index c1b3e155..00000000 --- a/src/WixToolset.Data/Rows/WixMediaRow.cs +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Data.Rows -{ - /// - /// Specialization of a row for the WixMedia table. - /// - public sealed class WixMediaRow : Row - { - /// - /// Creates a WixMedia row that does not belong to a table. - /// - /// Original source lines for this row. - /// TableDefinition this Media row belongs to and should get its column definitions from. - public WixMediaRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) : - base(sourceLineNumbers, tableDef) - { - } - - /// - /// Creates a WixMedia row that belongs to a table. - /// - /// Original source lines for this row. - /// Table this Media row belongs to and should get its column definitions from. - public WixMediaRow(SourceLineNumber sourceLineNumbers, Table table) : - base(sourceLineNumbers, table) - { - } - - /// - /// Gets or sets the disk id for this media. - /// - /// Disk id for the media. - public int DiskId - { - get { return (int)this.Fields[0].Data; } - set { this.Fields[0].Data = value; } - } - - /// - /// Gets or sets the compression level for this media row. - /// - /// Compression level. - public CompressionLevel? CompressionLevel - { - get { return (CompressionLevel?)this.Fields[1].AsNullableInteger(); } - set { this.Fields[1].Data = value; } - } - - /// - /// Gets or sets the layout location for this media row. - /// - /// Layout location to the root of the media. - public string Layout - { - get { return (string)this.Fields[2].Data; } - set { this.Fields[2].Data = value; } - } - } -} diff --git a/src/WixToolset.Data/Rows/WixMediaTemplateRow.cs b/src/WixToolset.Data/Rows/WixMediaTemplateRow.cs deleted file mode 100644 index 27c5ccce..00000000 --- a/src/WixToolset.Data/Rows/WixMediaTemplateRow.cs +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Data.Rows -{ - /// - /// Specialization of a row for the MediaTemplate table. - /// - public sealed class WixMediaTemplateRow : Row - { - /// - /// Creates a MediaTemplate row that belongs to a table. - /// - /// Original source lines for this row. - /// Table this MediaTeplate row belongs to and should get its column definitions from. - public WixMediaTemplateRow(SourceLineNumber sourceLineNumbers, Table table) - : base(sourceLineNumbers, table) - { - } - - /// - /// Gets or sets the cabinet template name for this media template row. - /// - /// Cabinet name. - public string CabinetTemplate - { - get { return (string)this.Fields[0].Data; } - set { this.Fields[0].Data = value; } - } - - /// - /// Gets or sets the compression level for this media template row. - /// - /// Compression level. - public CompressionLevel? CompressionLevel - { - get { return (CompressionLevel?)this.Fields[1].AsNullableInteger(); } - set { this.Fields[1].Data = value; } - } - - /// - /// Gets or sets the disk prompt for this media template row. - /// - /// Disk prompt. - public string DiskPrompt - { - get { return (string)this.Fields[2].Data; } - set { this.Fields[2].Data = value; } - } - - - /// - /// Gets or sets the volume label for this media template row. - /// - /// Volume label. - public string VolumeLabel - { - get { return (string)this.Fields[3].Data; } - set { this.Fields[3].Data = value; } - } - - /// - /// Gets or sets the maximum uncompressed media size for this media template row. - /// - /// Disk id. - public int MaximumUncompressedMediaSize - { - get { return (int)this.Fields[4].Data; } - set { this.Fields[4].Data = value; } - } - - /// - /// Gets or sets the Maximum Cabinet Size For Large File Splitting for this media template row. - /// - /// Disk id. - public int MaximumCabinetSizeForLargeFileSplitting - { - get { return (int)this.Fields[5].Data; } - set { this.Fields[5].Data = value; } - } - } -} diff --git a/src/WixToolset.Data/Rows/WixMergeRow.cs b/src/WixToolset.Data/Rows/WixMergeRow.cs deleted file mode 100644 index 54f2125c..00000000 --- a/src/WixToolset.Data/Rows/WixMergeRow.cs +++ /dev/null @@ -1,149 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Data.Rows -{ - using System; - using System.Globalization; - using System.Text; - using System.Xml; - - /// - /// Specialization of a row for tracking merge statements. - /// - public sealed class WixMergeRow : Row - { - /// - /// Creates a Merge row that does not belong to a table. - /// - /// Original source lines for this row. - /// TableDefinition this Merge row belongs to and should get its column definitions from. - public WixMergeRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) : - base(sourceLineNumbers, tableDef) - { - } - - /// Creates a Merge row that belongs to a table. - /// Original source lines for this row. - /// Table this Merge row belongs to and should get its column definitions from. - public WixMergeRow(SourceLineNumber sourceLineNumbers, Table table) : - base(sourceLineNumbers, table) - { - } - - /// - /// Gets and sets the id for a merge row. - /// - /// Id for the row. - public string Id - { - get { return (string)this.Fields[0].Data; } - set { this.Fields[0].Data = value; } - } - - /// - /// Gets and sets the language for a merge row. - /// - /// Language for the row. - public string Language - { - get { return (string)this.Fields[1].Data; } - set { this.Fields[1].Data = value; } - } - - /// - /// Gets and sets the directory for a merge row. - /// - /// Direcotory for the row. - public string Directory - { - get { return (string)this.Fields[2].Data; } - set { this.Fields[2].Data = value; } - } - - /// - /// Gets and sets the path to the merge module for a merge row. - /// - /// Source path for the row. - public string SourceFile - { - get { return (string)this.Fields[3].Data; } - set { this.Fields[3].Data = value; } - } - - /// - /// Gets and sets the disk id the merge module should be placed on for a merge row. - /// - /// Disk identifier for row. - public int DiskId - { - get { return (int)this.Fields[4].Data; } - set { this.Fields[4].Data = value; } - } - - /// - /// Gets and sets the compression value for a merge row. - /// - /// Compression for a merge row. - public YesNoType FileCompression - { - get - { - if (null == this.Fields[5].Data) - { - return YesNoType.NotSet; - } - else if (1 == (int)this.Fields[5].Data) - { - return YesNoType.Yes; - } - else if (0 == (int)this.Fields[5].Data) - { - return YesNoType.No; - } - else - { - throw new InvalidOperationException(String.Format(CultureInfo.CurrentUICulture, WixDataStrings.EXP_MergeTableFileCompressionColumnContainsInvalidValue, this.Fields[5].Data)); - } - } - set - { - if (YesNoType.Yes == value) - { - this.Fields[5].Data = 1; - } - else if (YesNoType.No == value) - { - this.Fields[5].Data = 0; - } - else if (YesNoType.NotSet == value) - { - this.Fields[5].Data = null; - } - else - { - throw new InvalidOperationException(String.Format(CultureInfo.CurrentUICulture, WixDataStrings.EXP_CannotSetMergeTableFileCompressionColumnToInvalidValue, value)); - } - } - } - - /// - /// Gets and sets the configuration data for a merge row. - /// - /// Comma delimited string of "name=value" pairs. - public string ConfigurationData - { - get { return (string)this.Fields[6].Data; } - set { this.Fields[6].Data = value; } - } - - /// - /// Gets and sets the primary feature for a merge row. - /// - /// The primary feature for a merge row. - public string Feature - { - get { return (string)this.Fields[7].Data; } - set { this.Fields[7].Data = value; } - } - } -} diff --git a/src/WixToolset.Data/Rows/WixPayloadPropertiesRow.cs b/src/WixToolset.Data/Rows/WixPayloadPropertiesRow.cs deleted file mode 100644 index 2e5f53ad..00000000 --- a/src/WixToolset.Data/Rows/WixPayloadPropertiesRow.cs +++ /dev/null @@ -1,81 +0,0 @@ -//------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2004, Outercurve Foundation. -// This software is released under Microsoft Reciprocal License (MS-RL). -// The license and further copyright text can be found in the file -// LICENSE.TXT at the root directory of the distribution. -// -//------------------------------------------------------------------------------------------------- - -namespace WixToolset.Data.Rows -{ - using System; - - /// - /// Specialization of a row for the WixPayloadProperties table. - /// - public class WixPayloadPropertiesRow : Row - { - /// - /// Creates a WixPayloadProperties row that does not belong to a table. - /// - /// Original source lines for this row. - /// TableDefinition this WixPayloadProperties row belongs to and should get its column definitions from. - public WixPayloadPropertiesRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) : - base(sourceLineNumbers, tableDef) - { - } - - /// - /// Creates a WixPayloadProperties row that belongs to a table. - /// - /// Original source lines for this row. - /// Table this WixPayloadProperties row belongs to and should get its column definitions from. - public WixPayloadPropertiesRow(SourceLineNumber sourceLineNumbers, Table table) : - base(sourceLineNumbers, table) - { - } - - public string Id - { - get { return (string)this.Fields[0].Data; } - set { this.Fields[0].Data = value; } - } - - public string Package - { - get { return (string)this.Fields[1].Data; } - set { this.Fields[1].Data = value; } - } - - public string Container - { - get { return (string)this.Fields[2].Data; } - set { this.Fields[2].Data = value; } - } - - public string Name - { - get { return (string)this.Fields[3].Data; } - set { this.Fields[3].Data = value; } - } - - public string Size - { - get { return (string)this.Fields[4].Data; } - set { this.Fields[4].Data = value; } - } - - public string DownloadUrl - { - get { return (string)this.Fields[5].Data; } - set { this.Fields[5].Data = value; } - } - - public string LayoutOnly - { - get { return (string)this.Fields[6].Data; } - set { this.Fields[6].Data = value; } - } - } -} diff --git a/src/WixToolset.Data/Rows/WixPropertyRow.cs b/src/WixToolset.Data/Rows/WixPropertyRow.cs deleted file mode 100644 index 5285195c..00000000 --- a/src/WixToolset.Data/Rows/WixPropertyRow.cs +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Data.Rows -{ - using System; - using System.Globalization; - - /// - /// Specialization of a row for the WixProperty table. - /// - public sealed class WixPropertyRow : Row - { - /// Creates a WixProperty row that belongs to a table. - /// Original source lines for this row. - /// Table this WixProperty row belongs to and should get its column definitions from. - public WixPropertyRow(SourceLineNumber sourceLineNumbers, Table table) : - base(sourceLineNumbers, table) - { - } - - /// - /// Gets and sets the id for this property row. - /// - /// Id for the property. - public string Id - { - get { return (string)this.Fields[0].Data; } - set { this.Fields[0].Data = value; } - } - - /// - /// Gets and sets if this is an admin property row. - /// - /// Flag if this is an admin property. - public bool Admin - { - get - { - return (0x1 == (Convert.ToInt32(this.Fields[1].Data, CultureInfo.InvariantCulture) & 0x1)); - } - - set - { - if (null == this.Fields[1].Data) - { - this.Fields[1].Data = 0; - } - - if (value) - { - this.Fields[1].Data = (int)this.Fields[1].Data | 0x1; - } - else - { - this.Fields[1].Data = (int)this.Fields[1].Data & ~0x1; - } - } - } - - /// - /// Gets and sets if this is a hidden property row. - /// - /// Flag if this is a hidden property. - public bool Hidden - { - get - { - return (0x2 == (Convert.ToInt32(this.Fields[1].Data, CultureInfo.InvariantCulture) & 0x2)); - } - - set - { - if (null == this.Fields[1].Data) - { - this.Fields[1].Data = 0; - } - - if (value) - { - this.Fields[1].Data = (int)this.Fields[1].Data | 0x2; - } - else - { - this.Fields[1].Data = (int)this.Fields[1].Data & ~0x2; - } - } - } - - /// - /// Gets and sets if this is a secure property row. - /// - /// Flag if this is a secure property. - public bool Secure - { - get - { - return (0x4 == (Convert.ToInt32(this.Fields[1].Data, CultureInfo.InvariantCulture) & 0x4)); - } - - set - { - if (null == this.Fields[1].Data) - { - this.Fields[1].Data = 0; - } - - if (value) - { - this.Fields[1].Data = (int)this.Fields[1].Data | 0x4; - } - else - { - this.Fields[1].Data = (int)this.Fields[1].Data & ~0x4; - } - } - } - } -} diff --git a/src/WixToolset.Data/Rows/WixRelatedBundleRow.cs b/src/WixToolset.Data/Rows/WixRelatedBundleRow.cs deleted file mode 100644 index 95fffde5..00000000 --- a/src/WixToolset.Data/Rows/WixRelatedBundleRow.cs +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Data.Rows -{ - using Serialize = WixToolset.Data.Serialize; - - /// - /// Specialization of a row for the RelatedBundle table. - /// - public sealed class WixRelatedBundleRow : Row - { - /// - /// Creates a RelatedBundle row that does not belong to a table. - /// - /// Original source lines for this row. - /// TableDefinition this RelatedBundle row belongs to and should get its column definitions from. - public WixRelatedBundleRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) : - base(sourceLineNumbers, tableDef) - { - } - - /// - /// Creates a RelatedBundle row that belongs to a table. - /// - /// Original source lines for this row. - /// Table this RelatedBundle row belongs to and should get its column definitions from. - public WixRelatedBundleRow(SourceLineNumber sourceLineNumbers, Table table) - : base(sourceLineNumbers, table) - { - } - - /// - /// Gets or sets the related bundle identifier. - /// - /// The related bundle identifier. - public string Id - { - get { return (string)this.Fields[0].Data; } - set { this.Fields[0].Data = value; } - } - - /// - /// Gets or sets the related bundle action. - /// - /// The related bundle action. - public Serialize.RelatedBundle.ActionType Action - { - get { return (Serialize.RelatedBundle.ActionType)this.Fields[1].Data; } - set { this.Fields[1].Data = (int)value; } - } - } -} diff --git a/src/WixToolset.Data/Rows/WixSimpleReferenceRow.cs b/src/WixToolset.Data/Rows/WixSimpleReferenceRow.cs deleted file mode 100644 index 3a2cf8f1..00000000 --- a/src/WixToolset.Data/Rows/WixSimpleReferenceRow.cs +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Data.Rows -{ - using System; - using System.Diagnostics; - using System.Xml; - - /// - /// Specialization of a row for the WixSimpleReference table. - /// - public sealed class WixSimpleReferenceRow : Row - { - /// - /// Creates a WixSimpleReferenceRow that belongs to a table. - /// - /// Original source lines for this row. - /// Table this row belongs to and should get its column definitions from. - public WixSimpleReferenceRow(SourceLineNumber sourceLineNumbers, Table table) - : base(sourceLineNumbers, table) - { - } - - /// - /// Creates a WixSimpleReferenceRow that belongs to a table. - /// - /// Original source lines for this row. - /// Table definitions for this row. - public WixSimpleReferenceRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDefinitions) - : base(sourceLineNumbers, tableDefinitions) - { - } - - /// - /// Gets or sets the primary keys of the simple reference. - /// - /// The primary keys of the simple reference. - public string PrimaryKeys - { - get { return (string)this.Fields[1].Data; } - set { this.Fields[1].Data = value; } - } - - /// - /// Gets the symbolic name. - /// - /// Symbolic name. - public string SymbolicName - { - get { return String.Concat(this.TableName, ":", this.PrimaryKeys); } - } - - /// - /// Gets or sets the table name of the simple reference. - /// - /// The table name of the simple reference. - public string TableName - { - get { return (string)this.Fields[0].Data; } - set { this.Fields[0].Data = value; } - } - } -} diff --git a/src/WixToolset.Data/Rows/WixUpdateRegistrationRow.cs b/src/WixToolset.Data/Rows/WixUpdateRegistrationRow.cs deleted file mode 100644 index 8d86f970..00000000 --- a/src/WixToolset.Data/Rows/WixUpdateRegistrationRow.cs +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Data.Rows -{ - using System; - - /// - /// Update registration information for Binding. - /// - public class WixUpdateRegistrationRow : Row - { - /// - /// Creates a WixUpdateRegistrationRow row that does not belong to a table. - /// - /// Original source lines for this row. - /// TableDefinition this WixUpdateRegistrationRow row belongs to and should get its column definitions from. - public WixUpdateRegistrationRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) : - base(sourceLineNumbers, tableDef) - { - } - - /// - /// Creates a WixUpdateRegistrationRow row that belongs to a table. - /// - /// Original source lines for this row. - /// Table this WixUpdateRegistrationRow row belongs to and should get its column definitions from. - public WixUpdateRegistrationRow(SourceLineNumber sourceLineNumbers, Table table) : - base(sourceLineNumbers, table) - { - } - - public string Manufacturer - { - get { return (string)this.Fields[0].Data; } - set { this.Fields[0].Data = value; } - } - - public string Department - { - get { return (string)this.Fields[1].Data; } - set { this.Fields[1].Data = value; } - } - - public string ProductFamily - { - get { return (string)this.Fields[2].Data; } - set { this.Fields[2].Data = value; } - } - - public string Name - { - get { return (string)this.Fields[3].Data; } - set { this.Fields[3].Data = value; } - } - - public string Classification - { - get { return (string)this.Fields[4].Data; } - set { this.Fields[4].Data = value; } - } - } -} diff --git a/src/WixToolset.Data/Rows/WixVariableRow.cs b/src/WixToolset.Data/Rows/WixVariableRow.cs deleted file mode 100644 index 241c9257..00000000 --- a/src/WixToolset.Data/Rows/WixVariableRow.cs +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Data.Rows -{ - using System; - using System.Globalization; - - /// - /// Specialization of a row for the WixVariable table. - /// - public sealed class WixVariableRow : Row - { - /// - /// Creates a WixVariable row that does not belong to a table. - /// - /// Original source lines for this row. - /// TableDefinition this WixVariable row belongs to and should get its column definitions from. - public WixVariableRow(SourceLineNumber sourceLineNumbers, TableDefinition tableDef) : - base(sourceLineNumbers, tableDef) - { - } - - /// - /// Creates a WixVariable row that belongs to a table. - /// - /// Original source lines for this row. - /// Table this WixVariable row belongs to and should get its column definitions from. - public WixVariableRow(SourceLineNumber sourceLineNumbers, Table table) : base(sourceLineNumbers, table) - { - } - - /// - /// Gets or sets the variable identifier. - /// - /// The variable identifier. - public string Id - { - get { return (string)this.Fields[0].Data; } - set { this.Fields[0].Data = value; } - } - - /// - /// Gets or sets the variable's value. - /// - /// The variable's value. - public string Value - { - get { return (string)this.Fields[1].Data; } - set { this.Fields[1].Data = value; } - } - - /// - /// Gets or sets whether this variable is overridable. - /// - /// Whether this variable is overridable. - public bool Overridable - { - get - { - return (0x1 == (Convert.ToInt32(this.Fields[2].Data, CultureInfo.InvariantCulture) & 0x1)); - } - - set - { - if (null == this.Fields[2].Data) - { - this.Fields[2].Data = 0; - } - - if (value) - { - this.Fields[2].Data = (int)this.Fields[2].Data | 0x1; - } - else - { - this.Fields[2].Data = (int)this.Fields[2].Data & ~0x1; - } - } - } - } -} diff --git a/src/WixToolset.Data/Section.cs b/src/WixToolset.Data/Section.cs index 6757aa77..f9e19f3b 100644 --- a/src/WixToolset.Data/Section.cs +++ b/src/WixToolset.Data/Section.cs @@ -2,6 +2,7 @@ namespace WixToolset.Data { +#if false using System; using System.Collections.Generic; using System.Diagnostics; @@ -237,4 +238,5 @@ namespace WixToolset.Data writer.WriteEndElement(); } } +#endif } diff --git a/src/WixToolset.Data/SimpleTupleDefinitionCreator.cs b/src/WixToolset.Data/SimpleTupleDefinitionCreator.cs new file mode 100644 index 00000000..b9d0b620 --- /dev/null +++ b/src/WixToolset.Data/SimpleTupleDefinitionCreator.cs @@ -0,0 +1,13 @@ +// Copyright (c) .NET 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.Data +{ + internal class SimpleTupleDefinitionCreator : ITupleDefinitionCreator + { + public bool TryGetTupleDefinitionByName(string name, out IntermediateTupleDefinition tupleDefinition) + { + tupleDefinition = TupleDefinitions.ByName(name); + return tupleDefinition != null; + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/SubStorage.cs b/src/WixToolset.Data/SubStorage.cs deleted file mode 100644 index e136bfe9..00000000 --- a/src/WixToolset.Data/SubStorage.cs +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Data -{ - using System.Xml; - - /// - /// Substorage inside an output. - /// - public sealed class SubStorage - { - /// - /// Instantiate a new substorage. - /// - /// The substorage name. - /// The substorage data. - public SubStorage(string name, Output data) - { - this.Name = name; - this.Data = data; - } - - /// - /// Gets the substorage name. - /// - /// The substorage name. - public string Name { get; private set; } - - /// - /// Gets the substorage data. - /// - /// The substorage data. - public Output Data { get; private set; } - - /// - /// Creates a SubStorage from the XmlReader. - /// - /// Reader to get data from. - /// New SubStorage object. - internal static SubStorage Read(XmlReader reader) - { - if (!reader.LocalName.Equals("subStorage" == reader.LocalName)) - { - throw new XmlException(); - } - - Output data = null; - bool empty = reader.IsEmptyElement; - string name = null; - - while (reader.MoveToNextAttribute()) - { - switch (reader.LocalName) - { - case "name": - name = reader.Value; - break; - } - } - - if (!empty) - { - bool done = false; - - while (!done && reader.Read()) - { - switch (reader.NodeType) - { - case XmlNodeType.Element: - switch (reader.LocalName) - { - case "wixOutput": - data = Output.Read(reader, true); - break; - default: - throw new XmlException(); - } - break; - case XmlNodeType.EndElement: - done = true; - break; - } - } - - if (!done) - { - throw new XmlException(); - } - } - - return new SubStorage(name, data); - } - - /// - /// Persists a SubStorage in an XML format. - /// - /// XmlWriter where the SubStorage should persist itself as XML. - internal void Write(XmlWriter writer) - { - writer.WriteStartElement("subStorage", Output.XmlNamespaceUri); - - writer.WriteAttributeString("name", this.Name); - - this.Data.Write(writer); - - writer.WriteEndElement(); - } - } -} diff --git a/src/WixToolset.Data/Symbol.cs b/src/WixToolset.Data/Symbol.cs index a96f9382..df2b5aeb 100644 --- a/src/WixToolset.Data/Symbol.cs +++ b/src/WixToolset.Data/Symbol.cs @@ -18,17 +18,18 @@ namespace WixToolset.Data /// Creates a symbol for a row. /// /// Row for the symbol - public Symbol(Row row) + public Symbol(IntermediateSection section, IntermediateTuple tuple) { - this.Row = row; - this.Name = String.Concat(this.Row.TableDefinition.Name, ":", this.Row.GetPrimaryKey()); + this.Row = tuple; + this.Section = section; + this.Name = String.Concat(this.Row.Definition.Name, ":", this.Row.Id.Id); } /// /// Gets the accessibility of the symbol which is a direct reflection of the accessibility of the row's accessibility. /// /// Accessbility of the symbol. - public AccessModifier Access { get { return this.Row.Access; } } + public AccessModifier Access { get { return this.Row.Id.Access; } } /// /// Gets the name of the symbol. @@ -40,13 +41,13 @@ namespace WixToolset.Data /// Gets the row for this symbol. /// /// Row for this symbol. - public Row Row { get; private set; } + public IntermediateTuple Row { get; private set; } /// /// Gets the section for the symbol. /// /// Section for the symbol. - public Section Section { get { return this.Row.Section; } } + public IntermediateSection Section { get; private set; } //{ get { return this.Row.Section; } } /// /// Gets any duplicates of this symbol that are possible conflicts. diff --git a/src/WixToolset.Data/Table.cs b/src/WixToolset.Data/Table.cs deleted file mode 100644 index 19a3a67d..00000000 --- a/src/WixToolset.Data/Table.cs +++ /dev/null @@ -1,446 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Data -{ - using System; - using System.Collections.Generic; - using System.Diagnostics; - using System.Diagnostics.CodeAnalysis; - using System.Globalization; - using System.IO; - using System.Text; - using System.Xml; - using WixToolset.Data.Rows; - - /// - /// Object that represents a table in a database. - /// - public sealed class Table - { - /// - /// Creates a table in a section. - /// - /// Section to add table to. - /// Definition of the table. - public Table(Section section, TableDefinition tableDefinition) - { - this.Section = section; - this.Definition = tableDefinition; - this.Rows = new List(); - } - - /// - /// Gets the section for the table. - /// - /// Section for the table. - public Section Section { get; private set; } - - /// - /// Gets the table definition. - /// - /// Definition of the table. - public TableDefinition Definition { get; private set; } - - /// - /// Gets the name of the table. - /// - /// Name of the table. - public string Name - { - get { return this.Definition.Name; } - } - - /// - /// Gets or sets the table transform operation. - /// - /// The table transform operation. - public TableOperation Operation { get; set; } - - /// - /// Gets the rows contained in the table. - /// - /// Rows contained in the table. - public IList Rows { get; private set; } - - /// - /// Creates a new row in the table. - /// - /// Original source lines for this row. - /// Specifies whether to only create the row or add it to the table automatically. - /// Row created in table. - public Row CreateRow(SourceLineNumber sourceLineNumbers, bool add = true) - { - Row row; - - switch (this.Name) - { - case "BBControl": - row = new BBControlRow(sourceLineNumbers, this); - break; - case "WixBundlePackage": - row = new WixBundlePackageRow(sourceLineNumbers, this); - break; - case "WixBundleExePackage": - row = new WixBundleExePackageRow(sourceLineNumbers, this); - break; - case "WixBundleMsiPackage": - row = new WixBundleMsiPackageRow(sourceLineNumbers, this); - break; - case "WixBundleMspPackage": - row = new WixBundleMspPackageRow(sourceLineNumbers, this); - break; - case "WixBundleMsuPackage": - row = new WixBundleMsuPackageRow(sourceLineNumbers, this); - break; - case "Component": - row = new ComponentRow(sourceLineNumbers, this); - break; - case "WixBundleContainer": - row = new WixBundleContainerRow(sourceLineNumbers, this); - break; - case "Control": - row = new ControlRow(sourceLineNumbers, this); - break; - case "File": - row = new FileRow(sourceLineNumbers, this); - break; - case "WixBundleMsiFeature": - row = new WixBundleMsiFeatureRow(sourceLineNumbers, this); - break; - case "WixBundleMsiProperty": - row = new WixBundleMsiPropertyRow(sourceLineNumbers, this); - break; - case "Media": - row = new MediaRow(sourceLineNumbers, this); - break; - case "WixBundlePayload": - row = new WixBundlePayloadRow(sourceLineNumbers, this); - break; - case "Property": - row = new PropertyRow(sourceLineNumbers, this); - break; - case "WixRelatedBundle": - row = new WixRelatedBundleRow(sourceLineNumbers, this); - break; - case "WixBundleRelatedPackage": - row = new WixBundleRelatedPackageRow(sourceLineNumbers, this); - break; - case "WixBundleRollbackBoundary": - row = new WixBundleRollbackBoundaryRow(sourceLineNumbers, this); - break; - case "Upgrade": - row = new UpgradeRow(sourceLineNumbers, this); - break; - case "WixBundleVariable": - row = new WixBundleVariableRow(sourceLineNumbers, this); - break; - case "WixAction": - row = new WixActionRow(sourceLineNumbers, this); - break; - case "WixApprovedExeForElevation": - row = new WixApprovedExeForElevationRow(sourceLineNumbers, this); - break; - case "WixBundle": - row = new WixBundleRow(sourceLineNumbers, this); - break; - case "WixBundlePackageExitCode": - row = new WixBundlePackageExitCodeRow(sourceLineNumbers, this); - break; - case "WixBundlePatchTargetCode": - row = new WixBundlePatchTargetCodeRow(sourceLineNumbers, this); - break; - case "WixBundleSlipstreamMsp": - row = new WixBundleSlipstreamMspRow(sourceLineNumbers, this); - break; - case "WixBundleUpdate": - row = new WixBundleUpdateRow(sourceLineNumbers, this); - break; - case "WixBundleCatalog": - row = new WixBundleCatalogRow(sourceLineNumbers, this); - break; - case "WixChain": - row = new WixChainRow(sourceLineNumbers, this); - break; - case "WixChainItem": - row = new WixChainItemRow(sourceLineNumbers, this); - break; - case "WixBundlePackageCommandLine": - row = new WixBundlePackageCommandLineRow(sourceLineNumbers, this); - break; - case "WixComplexReference": - row = new WixComplexReferenceRow(sourceLineNumbers, this); - break; - case "WixDeltaPatchFile": - row = new WixDeltaPatchFileRow(sourceLineNumbers, this); - break; - case "WixDeltaPatchSymbolPaths": - row = new WixDeltaPatchSymbolPathsRow(sourceLineNumbers, this); - break; - case "WixFile": - row = new WixFileRow(sourceLineNumbers, this); - break; - case "WixGroup": - row = new WixGroupRow(sourceLineNumbers, this); - break; - case "WixMedia": - row = new WixMediaRow(sourceLineNumbers, this); - break; - case "WixMediaTemplate": - row = new WixMediaTemplateRow(sourceLineNumbers, this); - break; - case "WixMerge": - row = new WixMergeRow(sourceLineNumbers, this); - break; - case "WixPayloadProperties": - row = new WixPayloadPropertiesRow(sourceLineNumbers, this); - break; - case "WixProperty": - row = new WixPropertyRow(sourceLineNumbers, this); - break; - case "WixSimpleReference": - row = new WixSimpleReferenceRow(sourceLineNumbers, this); - break; - case "WixUpdateRegistration": - row = new WixUpdateRegistrationRow(sourceLineNumbers, this); - break; - case "WixVariable": - row = new WixVariableRow(sourceLineNumbers, this); - break; - - default: - row = new Row(sourceLineNumbers, this); - break; - } - - if (add) - { - this.Rows.Add(row); - } - - return row; - } - - /// - /// Parse a table from the xml. - /// - /// XmlReader where the intermediate is persisted. - /// Section to populate with persisted data. - /// TableDefinitions to use in the intermediate. - /// The parsed table. - internal static Table Read(XmlReader reader, Section section, TableDefinitionCollection tableDefinitions) - { - Debug.Assert("table" == reader.LocalName); - - bool empty = reader.IsEmptyElement; - TableOperation operation = TableOperation.None; - string name = null; - - while (reader.MoveToNextAttribute()) - { - switch (reader.LocalName) - { - case "name": - name = reader.Value; - break; - case "op": - switch (reader.Value) - { - case "add": - operation = TableOperation.Add; - break; - case "drop": - operation = TableOperation.Drop; - break; - default: - throw new XmlException(); - } - break; - } - } - - if (null == name) - { - throw new XmlException(); - } - - TableDefinition tableDefinition = tableDefinitions[name]; - Table table = new Table(section, tableDefinition); - table.Operation = operation; - - if (!empty) - { - bool done = false; - - // loop through all the rows in a table - while (!done && reader.Read()) - { - switch (reader.NodeType) - { - case XmlNodeType.Element: - switch (reader.LocalName) - { - case "row": - Row.Read(reader, table); - break; - default: - throw new XmlException(); - } - break; - case XmlNodeType.EndElement: - done = true; - break; - } - } - - if (!done) - { - throw new XmlException(); - } - } - - return table; - } - - /// - /// Modularize the table. - /// - /// String containing the GUID of the Merge Module, if appropriate. - /// Optional collection of identifiers that should not be modularized. - public void Modularize(string modularizationGuid, ISet suppressModularizationIdentifiers) - { - List modularizedColumns = new List(); - - // find the modularized columns - for (int i = 0; i < this.Definition.Columns.Count; i++) - { - if (ColumnModularizeType.None != this.Definition.Columns[i].ModularizeType) - { - modularizedColumns.Add(i); - } - } - - if (0 < modularizedColumns.Count) - { - foreach (Row row in this.Rows) - { - foreach (int modularizedColumn in modularizedColumns) - { - Field field = row.Fields[modularizedColumn]; - - if (null != field.Data) - { - field.Data = row.GetModularizedValue(field, modularizationGuid, suppressModularizationIdentifiers); - } - } - } - } - } - - /// - /// Persists a row in an XML format. - /// - /// XmlWriter where the Row should persist itself as XML. - [SuppressMessage("Microsoft.Globalization", "CA1308:NormalizeStringsToUppercase", Justification = "Changing the way this string normalizes would result " + - "in a change to the way the intermediate files are generated, potentially causing extra churn in patches on an MSI built from an older version of WiX. " + - "Furthermore, there is no security hole here, as the strings won't need to make a round trip")] - internal void Write(XmlWriter writer) - { - if (null == writer) - { - throw new ArgumentNullException("writer"); - } - - writer.WriteStartElement("table", Intermediate.XmlNamespaceUri); - writer.WriteAttributeString("name", this.Name); - - if (TableOperation.None != this.Operation) - { - writer.WriteAttributeString("op", this.Operation.ToString().ToLowerInvariant()); - } - - foreach (Row row in this.Rows) - { - row.Write(writer); - } - - writer.WriteEndElement(); - } - - /// - /// Writes the table in IDT format to the provided stream. - /// - /// Stream to write the table to. - /// Whether to keep columns added in a transform. - public void ToIdtDefinition(StreamWriter writer, bool keepAddedColumns) - { - if (this.Definition.Unreal) - { - return; - } - - if (TableDefinition.MaxColumnsInRealTable < this.Definition.Columns.Count) - { - throw new WixException(WixDataErrors.TooManyColumnsInRealTable(this.Definition.Name, this.Definition.Columns.Count, TableDefinition.MaxColumnsInRealTable)); - } - - // Tack on the table header, and flush before we start writing bytes directly to the stream. - writer.Write(this.Definition.ToIdtDefinition(keepAddedColumns)); - writer.Flush(); - - using (NonClosingStreamWrapper wrapper = new NonClosingStreamWrapper(writer.BaseStream)) - using (BufferedStream buffStream = new BufferedStream(wrapper)) - { - // Create an encoding that replaces characters with question marks, and doesn't throw. We'll - // use this in case of errors - Encoding convertEncoding = Encoding.GetEncoding(writer.Encoding.CodePage); - - foreach (Row row in this.Rows) - { - if (row.Redundant) - { - continue; - } - - string rowString = row.ToIdtDefinition(keepAddedColumns); - byte[] rowBytes; - - try - { - // GetBytes will throw an exception if any character doesn't match our current encoding - rowBytes = writer.Encoding.GetBytes(rowString); - } - catch (EncoderFallbackException) - { - Messaging.Instance.OnMessage(WixDataErrors.InvalidStringForCodepage(row.SourceLineNumbers, Convert.ToString(writer.Encoding.WindowsCodePage, CultureInfo.InvariantCulture))); - - rowBytes = convertEncoding.GetBytes(rowString); - } - - buffStream.Write(rowBytes, 0, rowBytes.Length); - } - } - } - - /// - /// Validates the rows of this OutputTable and throws if it collides on - /// primary keys. - /// - public void ValidateRows() - { - Dictionary primaryKeys = new Dictionary(); - - foreach (Row row in this.Rows) - { - string primaryKey = row.GetPrimaryKey(); - - SourceLineNumber collisionSourceLineNumber; - if (primaryKeys.TryGetValue(primaryKey, out collisionSourceLineNumber)) - { - throw new WixException(WixDataErrors.DuplicatePrimaryKey(collisionSourceLineNumber, primaryKey, this.Definition.Name)); - } - - primaryKeys.Add(primaryKey, row.SourceLineNumbers); - } - } - } -} diff --git a/src/WixToolset.Data/TableDefinition.cs b/src/WixToolset.Data/TableDefinition.cs deleted file mode 100644 index 40aaac84..00000000 --- a/src/WixToolset.Data/TableDefinition.cs +++ /dev/null @@ -1,334 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Data -{ - using System; - using System.Collections.Generic; - using System.Collections.ObjectModel; - using System.Text; - using System.Xml; - - /// - /// Definition of a table in a database. - /// - public sealed class TableDefinition : IComparable - { - /// - /// Tracks the maximum number of columns supported in a real table. - /// This is a Windows Installer limitation. - /// - public const int MaxColumnsInRealTable = 32; - - /// - /// Creates a table definition. - /// - /// Name of table to create. - /// Flag if rows in this table create symbols. - /// Flag if table is unreal. - /// Flag if table is part of UX Manifest. - public TableDefinition(string name, IList columns, bool createSymbols, bool unreal, bool bootstrapperApplicationData = false) - { - this.Name = name; - this.CreateSymbols = createSymbols; - this.Unreal = unreal; - this.BootstrapperApplicationData = bootstrapperApplicationData; - - this.Columns = new ReadOnlyCollection(columns); - } - - /// - /// Gets if rows in this table create symbols. - /// - /// Flag if rows in this table create symbols. - public bool CreateSymbols { get; private set; } - - /// - /// Gets the name of the table. - /// - /// Name of the table. - public string Name { get; private set; } - - /// - /// Gets if the table is unreal. - /// - /// Flag if table is unreal. - public bool Unreal { get; private set; } - - /// - /// Gets if the table is a part of the bootstrapper application data manifest. - /// - /// Flag if table is a part of the bootstrapper application data manifest. - public bool BootstrapperApplicationData { get; private set; } - - /// - /// Gets the collection of column definitions for this table. - /// - /// Collection of column definitions for this table. - public IList Columns { get; private set; } - - /// - /// Gets the column definition in the table by index. - /// - /// Index of column to locate. - /// Column definition in the table by index. - public ColumnDefinition this[int columnIndex] - { - get { return this.Columns[columnIndex]; } - } - - /// - /// Gets the table definition in IDT format. - /// - /// Whether to keep columns added in a transform. - /// Table definition in IDT format. - public string ToIdtDefinition(bool keepAddedColumns) - { - bool first = true; - StringBuilder columnString = new StringBuilder(); - StringBuilder dataString = new StringBuilder(); - StringBuilder tableString = new StringBuilder(); - - tableString.Append(this.Name); - foreach (ColumnDefinition column in this.Columns) - { - // conditionally keep columns added in a transform; otherwise, - // break because columns can only be added at the end - if (column.Added && !keepAddedColumns) - { - break; - } - - if (!first) - { - columnString.Append('\t'); - dataString.Append('\t'); - } - - columnString.Append(column.Name); - dataString.Append(column.IdtType); - - if (column.PrimaryKey) - { - tableString.AppendFormat("\t{0}", column.Name); - } - - first = false; - } - columnString.Append("\r\n"); - columnString.Append(dataString); - columnString.Append("\r\n"); - columnString.Append(tableString); - columnString.Append("\r\n"); - - return columnString.ToString(); - } - - /// - /// Adds the validation rows to the _Validation table. - /// - /// The _Validation table. - public void AddValidationRows(Table validationTable) - { - foreach (ColumnDefinition columnDef in this.Columns) - { - Row row = validationTable.CreateRow(null); - - row[0] = this.Name; - - row[1] = columnDef.Name; - - if (columnDef.Nullable) - { - row[2] = "Y"; - } - else - { - row[2] = "N"; - } - - if (columnDef.IsMinValueSet) - { - row[3] = columnDef.MinValue; - } - - if (columnDef.IsMaxValueSet) - { - row[4] = columnDef.MaxValue; - } - - row[5] = columnDef.KeyTable; - - if (columnDef.IsKeyColumnSet) - { - row[6] = columnDef.KeyColumn; - } - - if (ColumnCategory.Unknown != columnDef.Category) - { - row[7] = columnDef.Category.ToString(); - } - - row[8] = columnDef.Possibilities; - - row[9] = columnDef.Description; - } - } - - /// - /// Compares this table definition to another table definition. - /// - /// - /// Only Windows Installer traits are compared, allowing for updates to WiX-specific table definitions. - /// - /// The updated to compare with this target definition. - /// 0 if the tables' core properties are the same; otherwise, non-0. - public int CompareTo(TableDefinition updated) - { - // by definition, this object is greater than null - if (null == updated) - { - return 1; - } - - // compare the table names - int ret = String.Compare(this.Name, updated.Name, StringComparison.Ordinal); - - // compare the column count - if (0 == ret) - { - // transforms can only add columns - ret = Math.Min(0, updated.Columns.Count - this.Columns.Count); - - // compare name, type, and length of each column - for (int i = 0; 0 == ret && this.Columns.Count > i; i++) - { - ColumnDefinition thisColumnDef = this.Columns[i]; - ColumnDefinition updatedColumnDef = updated.Columns[i]; - - ret = thisColumnDef.CompareTo(updatedColumnDef); - } - } - - return ret; - } - - /// - /// Parses table definition from xml reader. - /// - /// Reader to get data from. - /// The TableDefintion represented by the Xml. - internal static TableDefinition Read(XmlReader reader) - { - bool empty = reader.IsEmptyElement; - bool createSymbols = false; - string name = null; - bool unreal = false; - bool bootstrapperApplicationData = false; - - while (reader.MoveToNextAttribute()) - { - switch (reader.LocalName) - { - case "createSymbols": - createSymbols = reader.Value.Equals("yes"); - break; - case "name": - name = reader.Value; - break; - case "unreal": - unreal = reader.Value.Equals("yes"); - break; - case "bootstrapperApplicationData": - bootstrapperApplicationData = reader.Value.Equals("yes"); - break; - } - } - - if (null == name) - { - throw new XmlException(); - } - - List columns = new List(); - bool hasPrimaryKeyColumn = false; - - // parse the child elements - if (!empty) - { - bool done = false; - - while (!done && reader.Read()) - { - switch (reader.NodeType) - { - case XmlNodeType.Element: - switch (reader.LocalName) - { - case "columnDefinition": - ColumnDefinition columnDefinition = ColumnDefinition.Read(reader); - columns.Add(columnDefinition); - - if (columnDefinition.PrimaryKey) - { - hasPrimaryKeyColumn = true; - } - break; - default: - throw new XmlException(); - } - break; - case XmlNodeType.EndElement: - done = true; - break; - } - } - - if (!unreal && !bootstrapperApplicationData && !hasPrimaryKeyColumn) - { - throw new WixException(WixDataErrors.RealTableMissingPrimaryKeyColumn(SourceLineNumber.CreateFromUri(reader.BaseURI), name)); - } - - if (!done) - { - throw new XmlException(); - } - } - - TableDefinition tableDefinition = new TableDefinition(name, columns, createSymbols, unreal, bootstrapperApplicationData); - return tableDefinition; - } - - /// - /// Persists an output in an XML format. - /// - /// XmlWriter where the Output should persist itself as XML. - internal void Write(XmlWriter writer) - { - writer.WriteStartElement("tableDefinition", TableDefinitionCollection.XmlNamespaceUri); - - writer.WriteAttributeString("name", this.Name); - - if (this.CreateSymbols) - { - writer.WriteAttributeString("createSymbols", "yes"); - } - - if (this.Unreal) - { - writer.WriteAttributeString("unreal", "yes"); - } - - if (this.BootstrapperApplicationData) - { - writer.WriteAttributeString("bootstrapperApplicationData", "yes"); - } - - foreach (ColumnDefinition columnDefinition in this.Columns) - { - columnDefinition.Write(writer); - } - - writer.WriteEndElement(); - } - } -} diff --git a/src/WixToolset.Data/TableDefinitionCollection.cs b/src/WixToolset.Data/TableDefinitionCollection.cs deleted file mode 100644 index 553f0eaa..00000000 --- a/src/WixToolset.Data/TableDefinitionCollection.cs +++ /dev/null @@ -1,229 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Data -{ - using System; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Xml; - - /// - /// Collection for table definitions indexed by table name. - /// - public sealed class TableDefinitionCollection : ICollection - { - public const string XmlNamespaceUri = "http://wixtoolset.org/schemas/v4/wi/tables"; - - private Dictionary collection; - - /// - /// Instantiate a new TableDefinitionCollection class. - /// - public TableDefinitionCollection() - { - this.collection = new Dictionary(); - } - - /// - /// Creates a shallow copy of the provided table definition collection. - /// - public TableDefinitionCollection(TableDefinitionCollection tableDefinitions) - { - this.collection = new Dictionary(tableDefinitions.collection); - } - - /// - /// Gets the number of items in the collection. - /// - /// Number of items in collection. - public int Count - { - get { return this.collection.Count; } - } - - /// - /// Table definition collections are never read-only. - /// - public bool IsReadOnly - { - get { return false; } - } - - /// - /// Gets a table definition by name. - /// - /// Name of table to locate. - public TableDefinition this[string tableName] - { - get - { - TableDefinition table; - if (!this.collection.TryGetValue(tableName, out table)) - { - throw new WixMissingTableDefinitionException(WixDataErrors.MissingTableDefinition(tableName)); - } - - return table; - } - } - - /// - /// Load a table definition collection from an XmlReader. - /// - /// Reader to get data from. - /// Suppress xml schema validation while loading. - /// The TableDefinitionCollection represented by the xml. - public static TableDefinitionCollection Load(XmlReader reader) - { - reader.MoveToContent(); - - return Read(reader); - } - - /// - /// Adds a table definition to the collection. - /// - /// Table definition to add to the collection. - /// Indexes by table definition name. - public void Add(TableDefinition tableDefinition) - { - this.collection.Add(tableDefinition.Name, tableDefinition); - } - - /// - /// Removes all table definitions from the collection. - /// - public void Clear() - { - this.collection.Clear(); - } - - /// - /// Checks if the collection contains a table name. - /// - /// The table to check in the collection. - /// True if collection contains the table. - public bool Contains(string tableName) - { - return this.collection.ContainsKey(tableName); - } - - /// - /// Checks if the collection contains a table. - /// - /// The table to check in the collection. - /// True if collection contains the table. - public bool Contains(TableDefinition table) - { - return this.collection.ContainsKey(table.Name); - } - - /// - /// Copies table definitions to an arry. - /// - /// Array to copy the table definitions to. - /// Index in the array to start copying at. - public void CopyTo(TableDefinition[] array, int index) - { - this.collection.Values.CopyTo(array, index); - } - - /// - /// Removes a table definition from the collection. - /// - /// Table to remove from the collection. - /// True if the table definition existed in the collection and was removed. - public bool Remove(TableDefinition table) - { - return this.collection.Remove(table.Name); - } - - /// - /// Gets enumerator for the collection. - /// - /// Enumerator for the collection. - public IEnumerator GetEnumerator() - { - return this.collection.Values.GetEnumerator(); - } - - /// - /// Gets the untyped enumerator for the collection. - /// - /// Untyped enumerator for the collection. - IEnumerator IEnumerable.GetEnumerator() - { - return this.collection.Values.GetEnumerator(); - } - - /// - /// Loads a collection of table definitions from a XmlReader in memory. - /// - /// Reader to get data from. - /// The TableDefinitionCollection represented by the xml. - internal static TableDefinitionCollection Read(XmlReader reader) - { - if ("tableDefinitions" != reader.LocalName) - { - throw new XmlException(); - } - - bool empty = reader.IsEmptyElement; - TableDefinitionCollection tableDefinitionCollection = new TableDefinitionCollection(); - - while (reader.MoveToNextAttribute()) - { - } - - // parse the child elements - if (!empty) - { - bool done = false; - - while (!done && reader.Read()) - { - switch (reader.NodeType) - { - case XmlNodeType.Element: - switch (reader.LocalName) - { - case "tableDefinition": - tableDefinitionCollection.Add(TableDefinition.Read(reader)); - break; - default: - throw new XmlException(); - } - break; - case XmlNodeType.EndElement: - done = true; - break; - } - } - - if (!done) - { - throw new XmlException(); - } - } - - return tableDefinitionCollection; - } - - /// - /// Persists a TableDefinitionCollection in an XML format. - /// - /// XmlWriter where the TableDefinitionCollection should persist itself as XML. - internal void Write(XmlWriter writer) - { - writer.WriteStartElement("tableDefinitions", XmlNamespaceUri); - - foreach (TableDefinition tableDefinition in this.collection.Values.OrderBy(t => t.Name)) - { - tableDefinition.Write(writer); - } - - writer.WriteEndElement(); - } - } -} diff --git a/src/WixToolset.Data/TableExtensions.cs b/src/WixToolset.Data/TableExtensions.cs deleted file mode 100644 index 1be64ffe..00000000 --- a/src/WixToolset.Data/TableExtensions.cs +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Data -{ - using System.Collections.Generic; - using System.Linq; - - /// - /// Methods that extend . - /// - public static class TableExtensions - { - /// - /// Gets the rows contained in the table as a particular row type. - /// - /// Table to get rows from. - /// If the is null, an empty enumerable will be returned. - public static IEnumerable RowsAs(this Table table) where T : Row - { - return (null == table) ? Enumerable.Empty() : table.Rows.Cast(); - } - } -} diff --git a/src/WixToolset.Data/TableIndexedCollection.cs b/src/WixToolset.Data/TableIndexedCollection.cs deleted file mode 100644 index 9f85efff..00000000 --- a/src/WixToolset.Data/TableIndexedCollection.cs +++ /dev/null @@ -1,153 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Data -{ - using System; - using System.Collections.Generic; - using System.Linq; - - /// - /// Collection for tables. - /// - public sealed class TableIndexedCollection : ICollection
- { - private Dictionary collection; - - /// - /// Instantiate a new empty collection. - /// - public TableIndexedCollection() - { - this.collection = new Dictionary(); - } - - /// - /// Instantiate a new collection populated with a set of tables. - /// - /// Set of tables. - public TableIndexedCollection(IEnumerable
tables) - { - this.collection = tables.ToDictionary(t => t.Name); - } - - /// - /// Gets the number of items in the collection. - /// - /// Number of items in collection. - public int Count - { - get { return this.collection.Count; } - } - - /// - /// Table indexed collection is never read only. - /// - public bool IsReadOnly - { - get { return false; } - } - - /// - /// Adds a table to the collection. - /// - /// Table to add to the collection. - /// Indexes the table by name. - public void Add(Table table) - { - this.collection.Add(table.Name, table); - } - - /// - /// Clear the tables from the collection. - /// - public void Clear() - { - this.collection.Clear(); - } - - /// - /// Determines if a table is in the collection. - /// - /// Table to check if it is in the collection. - /// True if the table name is in the collection, otherwise false. - public bool Contains(Table table) - { - return this.collection.ContainsKey(table.Name); - } - - /// - /// Copies the collection into an array. - /// - /// Array to copy the collection into. - /// Index to start copying from. - public void CopyTo(Table[] array, int arrayIndex) - { - this.collection.Values.CopyTo(array, arrayIndex); - } - - /// - /// Remove a table from the collection by name. - /// - /// Table name to remove from the collection. - public void Remove(string tableName) - { - this.collection.Remove(tableName); - } - - /// - /// Remove a table from the collection. - /// - /// Table with matching name to remove from the collection. - public bool Remove(Table table) - { - return this.collection.Remove(table.Name); - } - - /// - /// Gets an enumerator over the whole collection. - /// - /// Collection enumerator. - public IEnumerator
GetEnumerator() - { - return this.collection.Values.GetEnumerator(); - } - - /// - /// Gets an untyped enumerator over the whole collection. - /// - /// Untyped collection enumerator. - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() - { - return this.collection.Values.GetEnumerator(); - } - - /// - /// Gets a table by name. - /// - /// Name of table to locate. - public Table this[string tableName] - { - get - { - Table table; - return this.collection.TryGetValue(tableName, out table) ? table : null; - } - - set - { - this.collection[tableName] = value; - } - } - - /// - /// Tries to find a table by name. - /// - /// Table name to locate. - /// Found table. - /// True if table with table name was found, otherwise false. - public bool TryGetTable(string tableName, out Table table) - { - return this.collection.TryGetValue(tableName, out table); - } - } -} diff --git a/src/WixToolset.Data/TableOperation.cs b/src/WixToolset.Data/TableOperation.cs deleted file mode 100644 index 8df44e73..00000000 --- a/src/WixToolset.Data/TableOperation.cs +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Data -{ - /// - /// The table transform operations. - /// - public enum TableOperation - { - /// - /// No operation. - /// - None, - - /// - /// Added table. - /// - Add, - - /// - /// Dropped table. - /// - Drop, - } -} diff --git a/src/WixToolset.Data/Tuples/ActionTextTuple.cs b/src/WixToolset.Data/Tuples/ActionTextTuple.cs new file mode 100644 index 00000000..771a8b02 --- /dev/null +++ b/src/WixToolset.Data/Tuples/ActionTextTuple.cs @@ -0,0 +1,60 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition ActionText = new IntermediateTupleDefinition( + TupleDefinitionType.ActionText, + new[] + { + new IntermediateFieldDefinition(nameof(ActionTextTupleFields.Action), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ActionTextTupleFields.Description), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ActionTextTupleFields.Template), IntermediateFieldType.String), + }, + typeof(ActionTextTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum ActionTextTupleFields + { + Action, + Description, + Template, + } + + public class ActionTextTuple : IntermediateTuple + { + public ActionTextTuple() : base(TupleDefinitions.ActionText, null, null) + { + } + + public ActionTextTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.ActionText, sourceLineNumber, id) + { + } + + public IntermediateField this[ActionTextTupleFields index] => this.Fields[(int)index]; + + public string Action + { + get => (string)this.Fields[(int)ActionTextTupleFields.Action]?.Value; + set => this.Set((int)ActionTextTupleFields.Action, value); + } + + public string Description + { + get => (string)this.Fields[(int)ActionTextTupleFields.Description]?.Value; + set => this.Set((int)ActionTextTupleFields.Description, value); + } + + public string Template + { + get => (string)this.Fields[(int)ActionTextTupleFields.Template]?.Value; + set => this.Set((int)ActionTextTupleFields.Template, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/AdminExecuteSequenceTuple.cs b/src/WixToolset.Data/Tuples/AdminExecuteSequenceTuple.cs new file mode 100644 index 00000000..25c717e0 --- /dev/null +++ b/src/WixToolset.Data/Tuples/AdminExecuteSequenceTuple.cs @@ -0,0 +1,60 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition AdminExecuteSequence = new IntermediateTupleDefinition( + TupleDefinitionType.AdminExecuteSequence, + new[] + { + new IntermediateFieldDefinition(nameof(AdminExecuteSequenceTupleFields.Action), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(AdminExecuteSequenceTupleFields.Condition), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(AdminExecuteSequenceTupleFields.Sequence), IntermediateFieldType.Number), + }, + typeof(AdminExecuteSequenceTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum AdminExecuteSequenceTupleFields + { + Action, + Condition, + Sequence, + } + + public class AdminExecuteSequenceTuple : IntermediateTuple + { + public AdminExecuteSequenceTuple() : base(TupleDefinitions.AdminExecuteSequence, null, null) + { + } + + public AdminExecuteSequenceTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.AdminExecuteSequence, sourceLineNumber, id) + { + } + + public IntermediateField this[AdminExecuteSequenceTupleFields index] => this.Fields[(int)index]; + + public string Action + { + get => (string)this.Fields[(int)AdminExecuteSequenceTupleFields.Action]?.Value; + set => this.Set((int)AdminExecuteSequenceTupleFields.Action, value); + } + + public string Condition + { + get => (string)this.Fields[(int)AdminExecuteSequenceTupleFields.Condition]?.Value; + set => this.Set((int)AdminExecuteSequenceTupleFields.Condition, value); + } + + public int Sequence + { + get => (int)this.Fields[(int)AdminExecuteSequenceTupleFields.Sequence]?.Value; + set => this.Set((int)AdminExecuteSequenceTupleFields.Sequence, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/AdminUISequenceTuple.cs b/src/WixToolset.Data/Tuples/AdminUISequenceTuple.cs new file mode 100644 index 00000000..d4681bb9 --- /dev/null +++ b/src/WixToolset.Data/Tuples/AdminUISequenceTuple.cs @@ -0,0 +1,60 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition AdminUISequence = new IntermediateTupleDefinition( + TupleDefinitionType.AdminUISequence, + new[] + { + new IntermediateFieldDefinition(nameof(AdminUISequenceTupleFields.Action), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(AdminUISequenceTupleFields.Condition), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(AdminUISequenceTupleFields.Sequence), IntermediateFieldType.Number), + }, + typeof(AdminUISequenceTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum AdminUISequenceTupleFields + { + Action, + Condition, + Sequence, + } + + public class AdminUISequenceTuple : IntermediateTuple + { + public AdminUISequenceTuple() : base(TupleDefinitions.AdminUISequence, null, null) + { + } + + public AdminUISequenceTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.AdminUISequence, sourceLineNumber, id) + { + } + + public IntermediateField this[AdminUISequenceTupleFields index] => this.Fields[(int)index]; + + public string Action + { + get => (string)this.Fields[(int)AdminUISequenceTupleFields.Action]?.Value; + set => this.Set((int)AdminUISequenceTupleFields.Action, value); + } + + public string Condition + { + get => (string)this.Fields[(int)AdminUISequenceTupleFields.Condition]?.Value; + set => this.Set((int)AdminUISequenceTupleFields.Condition, value); + } + + public int Sequence + { + get => (int)this.Fields[(int)AdminUISequenceTupleFields.Sequence]?.Value; + set => this.Set((int)AdminUISequenceTupleFields.Sequence, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/AdvtExecuteSequenceTuple.cs b/src/WixToolset.Data/Tuples/AdvtExecuteSequenceTuple.cs new file mode 100644 index 00000000..36a53af2 --- /dev/null +++ b/src/WixToolset.Data/Tuples/AdvtExecuteSequenceTuple.cs @@ -0,0 +1,60 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition AdvtExecuteSequence = new IntermediateTupleDefinition( + TupleDefinitionType.AdvtExecuteSequence, + new[] + { + new IntermediateFieldDefinition(nameof(AdvtExecuteSequenceTupleFields.Action), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(AdvtExecuteSequenceTupleFields.Condition), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(AdvtExecuteSequenceTupleFields.Sequence), IntermediateFieldType.Number), + }, + typeof(AdvtExecuteSequenceTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum AdvtExecuteSequenceTupleFields + { + Action, + Condition, + Sequence, + } + + public class AdvtExecuteSequenceTuple : IntermediateTuple + { + public AdvtExecuteSequenceTuple() : base(TupleDefinitions.AdvtExecuteSequence, null, null) + { + } + + public AdvtExecuteSequenceTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.AdvtExecuteSequence, sourceLineNumber, id) + { + } + + public IntermediateField this[AdvtExecuteSequenceTupleFields index] => this.Fields[(int)index]; + + public string Action + { + get => (string)this.Fields[(int)AdvtExecuteSequenceTupleFields.Action]?.Value; + set => this.Set((int)AdvtExecuteSequenceTupleFields.Action, value); + } + + public string Condition + { + get => (string)this.Fields[(int)AdvtExecuteSequenceTupleFields.Condition]?.Value; + set => this.Set((int)AdvtExecuteSequenceTupleFields.Condition, value); + } + + public int Sequence + { + get => (int)this.Fields[(int)AdvtExecuteSequenceTupleFields.Sequence]?.Value; + set => this.Set((int)AdvtExecuteSequenceTupleFields.Sequence, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/AppIdTuple.cs b/src/WixToolset.Data/Tuples/AppIdTuple.cs new file mode 100644 index 00000000..7816e4c3 --- /dev/null +++ b/src/WixToolset.Data/Tuples/AppIdTuple.cs @@ -0,0 +1,92 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition AppId = new IntermediateTupleDefinition( + TupleDefinitionType.AppId, + new[] + { + new IntermediateFieldDefinition(nameof(AppIdTupleFields.AppId), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(AppIdTupleFields.RemoteServerName), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(AppIdTupleFields.LocalService), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(AppIdTupleFields.ServiceParameters), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(AppIdTupleFields.DllSurrogate), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(AppIdTupleFields.ActivateAtStorage), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(AppIdTupleFields.RunAsInteractiveUser), IntermediateFieldType.Number), + }, + typeof(AppIdTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum AppIdTupleFields + { + AppId, + RemoteServerName, + LocalService, + ServiceParameters, + DllSurrogate, + ActivateAtStorage, + RunAsInteractiveUser, + } + + public class AppIdTuple : IntermediateTuple + { + public AppIdTuple() : base(TupleDefinitions.AppId, null, null) + { + } + + public AppIdTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.AppId, sourceLineNumber, id) + { + } + + public IntermediateField this[AppIdTupleFields index] => this.Fields[(int)index]; + + public string AppId + { + get => (string)this.Fields[(int)AppIdTupleFields.AppId]?.Value; + set => this.Set((int)AppIdTupleFields.AppId, value); + } + + public string RemoteServerName + { + get => (string)this.Fields[(int)AppIdTupleFields.RemoteServerName]?.Value; + set => this.Set((int)AppIdTupleFields.RemoteServerName, value); + } + + public string LocalService + { + get => (string)this.Fields[(int)AppIdTupleFields.LocalService]?.Value; + set => this.Set((int)AppIdTupleFields.LocalService, value); + } + + public string ServiceParameters + { + get => (string)this.Fields[(int)AppIdTupleFields.ServiceParameters]?.Value; + set => this.Set((int)AppIdTupleFields.ServiceParameters, value); + } + + public string DllSurrogate + { + get => (string)this.Fields[(int)AppIdTupleFields.DllSurrogate]?.Value; + set => this.Set((int)AppIdTupleFields.DllSurrogate, value); + } + + public int ActivateAtStorage + { + get => (int)this.Fields[(int)AppIdTupleFields.ActivateAtStorage]?.Value; + set => this.Set((int)AppIdTupleFields.ActivateAtStorage, value); + } + + public int RunAsInteractiveUser + { + get => (int)this.Fields[(int)AppIdTupleFields.RunAsInteractiveUser]?.Value; + set => this.Set((int)AppIdTupleFields.RunAsInteractiveUser, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/AppSearchTuple.cs b/src/WixToolset.Data/Tuples/AppSearchTuple.cs new file mode 100644 index 00000000..e32064b8 --- /dev/null +++ b/src/WixToolset.Data/Tuples/AppSearchTuple.cs @@ -0,0 +1,52 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition AppSearch = new IntermediateTupleDefinition( + TupleDefinitionType.AppSearch, + new[] + { + new IntermediateFieldDefinition(nameof(AppSearchTupleFields.Property), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(AppSearchTupleFields.Signature_), IntermediateFieldType.String), + }, + typeof(AppSearchTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum AppSearchTupleFields + { + Property, + Signature_, + } + + public class AppSearchTuple : IntermediateTuple + { + public AppSearchTuple() : base(TupleDefinitions.AppSearch, null, null) + { + } + + public AppSearchTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.AppSearch, sourceLineNumber, id) + { + } + + public IntermediateField this[AppSearchTupleFields index] => this.Fields[(int)index]; + + public string Property + { + get => (string)this.Fields[(int)AppSearchTupleFields.Property]?.Value; + set => this.Set((int)AppSearchTupleFields.Property, value); + } + + public string Signature_ + { + get => (string)this.Fields[(int)AppSearchTupleFields.Signature_]?.Value; + set => this.Set((int)AppSearchTupleFields.Signature_, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/BBControlTuple.cs b/src/WixToolset.Data/Tuples/BBControlTuple.cs new file mode 100644 index 00000000..dae041d4 --- /dev/null +++ b/src/WixToolset.Data/Tuples/BBControlTuple.cs @@ -0,0 +1,108 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition BBControl = new IntermediateTupleDefinition( + TupleDefinitionType.BBControl, + new[] + { + new IntermediateFieldDefinition(nameof(BBControlTupleFields.Billboard_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(BBControlTupleFields.BBControl), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(BBControlTupleFields.Type), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(BBControlTupleFields.X), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(BBControlTupleFields.Y), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(BBControlTupleFields.Width), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(BBControlTupleFields.Height), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(BBControlTupleFields.Attributes), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(BBControlTupleFields.Text), IntermediateFieldType.String), + }, + typeof(BBControlTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum BBControlTupleFields + { + Billboard_, + BBControl, + Type, + X, + Y, + Width, + Height, + Attributes, + Text, + } + + public class BBControlTuple : IntermediateTuple + { + public BBControlTuple() : base(TupleDefinitions.BBControl, null, null) + { + } + + public BBControlTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.BBControl, sourceLineNumber, id) + { + } + + public IntermediateField this[BBControlTupleFields index] => this.Fields[(int)index]; + + public string Billboard_ + { + get => (string)this.Fields[(int)BBControlTupleFields.Billboard_]?.Value; + set => this.Set((int)BBControlTupleFields.Billboard_, value); + } + + public string BBControl + { + get => (string)this.Fields[(int)BBControlTupleFields.BBControl]?.Value; + set => this.Set((int)BBControlTupleFields.BBControl, value); + } + + public string Type + { + get => (string)this.Fields[(int)BBControlTupleFields.Type]?.Value; + set => this.Set((int)BBControlTupleFields.Type, value); + } + + public int X + { + get => (int)this.Fields[(int)BBControlTupleFields.X]?.Value; + set => this.Set((int)BBControlTupleFields.X, value); + } + + public int Y + { + get => (int)this.Fields[(int)BBControlTupleFields.Y]?.Value; + set => this.Set((int)BBControlTupleFields.Y, value); + } + + public int Width + { + get => (int)this.Fields[(int)BBControlTupleFields.Width]?.Value; + set => this.Set((int)BBControlTupleFields.Width, value); + } + + public int Height + { + get => (int)this.Fields[(int)BBControlTupleFields.Height]?.Value; + set => this.Set((int)BBControlTupleFields.Height, value); + } + + public int Attributes + { + get => (int)this.Fields[(int)BBControlTupleFields.Attributes]?.Value; + set => this.Set((int)BBControlTupleFields.Attributes, value); + } + + public string Text + { + get => (string)this.Fields[(int)BBControlTupleFields.Text]?.Value; + set => this.Set((int)BBControlTupleFields.Text, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/BillboardTuple.cs b/src/WixToolset.Data/Tuples/BillboardTuple.cs new file mode 100644 index 00000000..43e2ace7 --- /dev/null +++ b/src/WixToolset.Data/Tuples/BillboardTuple.cs @@ -0,0 +1,68 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition Billboard = new IntermediateTupleDefinition( + TupleDefinitionType.Billboard, + new[] + { + new IntermediateFieldDefinition(nameof(BillboardTupleFields.Billboard), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(BillboardTupleFields.Feature_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(BillboardTupleFields.Action), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(BillboardTupleFields.Ordering), IntermediateFieldType.Number), + }, + typeof(BillboardTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum BillboardTupleFields + { + Billboard, + Feature_, + Action, + Ordering, + } + + public class BillboardTuple : IntermediateTuple + { + public BillboardTuple() : base(TupleDefinitions.Billboard, null, null) + { + } + + public BillboardTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.Billboard, sourceLineNumber, id) + { + } + + public IntermediateField this[BillboardTupleFields index] => this.Fields[(int)index]; + + public string Billboard + { + get => (string)this.Fields[(int)BillboardTupleFields.Billboard]?.Value; + set => this.Set((int)BillboardTupleFields.Billboard, value); + } + + public string Feature_ + { + get => (string)this.Fields[(int)BillboardTupleFields.Feature_]?.Value; + set => this.Set((int)BillboardTupleFields.Feature_, value); + } + + public string Action + { + get => (string)this.Fields[(int)BillboardTupleFields.Action]?.Value; + set => this.Set((int)BillboardTupleFields.Action, value); + } + + public int Ordering + { + get => (int)this.Fields[(int)BillboardTupleFields.Ordering]?.Value; + set => this.Set((int)BillboardTupleFields.Ordering, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/BinaryTuple.cs b/src/WixToolset.Data/Tuples/BinaryTuple.cs new file mode 100644 index 00000000..8134167b --- /dev/null +++ b/src/WixToolset.Data/Tuples/BinaryTuple.cs @@ -0,0 +1,52 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition Binary = new IntermediateTupleDefinition( + TupleDefinitionType.Binary, + new[] + { + new IntermediateFieldDefinition(nameof(BinaryTupleFields.Name), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(BinaryTupleFields.Data), IntermediateFieldType.Path), + }, + typeof(BinaryTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum BinaryTupleFields + { + Name, + Data, + } + + public class BinaryTuple : IntermediateTuple + { + public BinaryTuple() : base(TupleDefinitions.Binary, null, null) + { + } + + public BinaryTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.Binary, sourceLineNumber, id) + { + } + + public IntermediateField this[BinaryTupleFields index] => this.Fields[(int)index]; + + public string Name + { + get => (string)this.Fields[(int)BinaryTupleFields.Name]?.Value; + set => this.Set((int)BinaryTupleFields.Name, value); + } + + public string Data + { + get => (string)this.Fields[(int)BinaryTupleFields.Data]?.Value; + set => this.Set((int)BinaryTupleFields.Data, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/BindImageTuple.cs b/src/WixToolset.Data/Tuples/BindImageTuple.cs new file mode 100644 index 00000000..fefafa2d --- /dev/null +++ b/src/WixToolset.Data/Tuples/BindImageTuple.cs @@ -0,0 +1,52 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition BindImage = new IntermediateTupleDefinition( + TupleDefinitionType.BindImage, + new[] + { + new IntermediateFieldDefinition(nameof(BindImageTupleFields.File_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(BindImageTupleFields.Path), IntermediateFieldType.String), + }, + typeof(BindImageTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum BindImageTupleFields + { + File_, + Path, + } + + public class BindImageTuple : IntermediateTuple + { + public BindImageTuple() : base(TupleDefinitions.BindImage, null, null) + { + } + + public BindImageTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.BindImage, sourceLineNumber, id) + { + } + + public IntermediateField this[BindImageTupleFields index] => this.Fields[(int)index]; + + public string File_ + { + get => (string)this.Fields[(int)BindImageTupleFields.File_]?.Value; + set => this.Set((int)BindImageTupleFields.File_, value); + } + + public string Path + { + get => (string)this.Fields[(int)BindImageTupleFields.Path]?.Value; + set => this.Set((int)BindImageTupleFields.Path, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/CCPSearchTuple.cs b/src/WixToolset.Data/Tuples/CCPSearchTuple.cs new file mode 100644 index 00000000..d1ca8458 --- /dev/null +++ b/src/WixToolset.Data/Tuples/CCPSearchTuple.cs @@ -0,0 +1,44 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition CCPSearch = new IntermediateTupleDefinition( + TupleDefinitionType.CCPSearch, + new[] + { + new IntermediateFieldDefinition(nameof(CCPSearchTupleFields.Signature_), IntermediateFieldType.String), + }, + typeof(CCPSearchTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum CCPSearchTupleFields + { + Signature_, + } + + public class CCPSearchTuple : IntermediateTuple + { + public CCPSearchTuple() : base(TupleDefinitions.CCPSearch, null, null) + { + } + + public CCPSearchTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.CCPSearch, sourceLineNumber, id) + { + } + + public IntermediateField this[CCPSearchTupleFields index] => this.Fields[(int)index]; + + public string Signature_ + { + get => (string)this.Fields[(int)CCPSearchTupleFields.Signature_]?.Value; + set => this.Set((int)CCPSearchTupleFields.Signature_, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/CheckBoxTuple.cs b/src/WixToolset.Data/Tuples/CheckBoxTuple.cs new file mode 100644 index 00000000..d76609f2 --- /dev/null +++ b/src/WixToolset.Data/Tuples/CheckBoxTuple.cs @@ -0,0 +1,52 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition CheckBox = new IntermediateTupleDefinition( + TupleDefinitionType.CheckBox, + new[] + { + new IntermediateFieldDefinition(nameof(CheckBoxTupleFields.Property), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(CheckBoxTupleFields.Value), IntermediateFieldType.String), + }, + typeof(CheckBoxTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum CheckBoxTupleFields + { + Property, + Value, + } + + public class CheckBoxTuple : IntermediateTuple + { + public CheckBoxTuple() : base(TupleDefinitions.CheckBox, null, null) + { + } + + public CheckBoxTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.CheckBox, sourceLineNumber, id) + { + } + + public IntermediateField this[CheckBoxTupleFields index] => this.Fields[(int)index]; + + public string Property + { + get => (string)this.Fields[(int)CheckBoxTupleFields.Property]?.Value; + set => this.Set((int)CheckBoxTupleFields.Property, value); + } + + public string Value + { + get => (string)this.Fields[(int)CheckBoxTupleFields.Value]?.Value; + set => this.Set((int)CheckBoxTupleFields.Value, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/ClassTuple.cs b/src/WixToolset.Data/Tuples/ClassTuple.cs new file mode 100644 index 00000000..a9bb3b95 --- /dev/null +++ b/src/WixToolset.Data/Tuples/ClassTuple.cs @@ -0,0 +1,140 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition Class = new IntermediateTupleDefinition( + TupleDefinitionType.Class, + new[] + { + new IntermediateFieldDefinition(nameof(ClassTupleFields.CLSID), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ClassTupleFields.Context), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ClassTupleFields.Component_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ClassTupleFields.ProgId_Default), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ClassTupleFields.Description), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ClassTupleFields.AppId_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ClassTupleFields.FileTypeMask), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ClassTupleFields.Icon_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ClassTupleFields.IconIndex), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(ClassTupleFields.DefInprocHandler), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ClassTupleFields.Argument), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ClassTupleFields.Feature_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ClassTupleFields.Attributes), IntermediateFieldType.Number), + }, + typeof(ClassTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum ClassTupleFields + { + CLSID, + Context, + Component_, + ProgId_Default, + Description, + AppId_, + FileTypeMask, + Icon_, + IconIndex, + DefInprocHandler, + Argument, + Feature_, + Attributes, + } + + public class ClassTuple : IntermediateTuple + { + public ClassTuple() : base(TupleDefinitions.Class, null, null) + { + } + + public ClassTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.Class, sourceLineNumber, id) + { + } + + public IntermediateField this[ClassTupleFields index] => this.Fields[(int)index]; + + public string CLSID + { + get => (string)this.Fields[(int)ClassTupleFields.CLSID]?.Value; + set => this.Set((int)ClassTupleFields.CLSID, value); + } + + public string Context + { + get => (string)this.Fields[(int)ClassTupleFields.Context]?.Value; + set => this.Set((int)ClassTupleFields.Context, value); + } + + public string Component_ + { + get => (string)this.Fields[(int)ClassTupleFields.Component_]?.Value; + set => this.Set((int)ClassTupleFields.Component_, value); + } + + public string ProgId_Default + { + get => (string)this.Fields[(int)ClassTupleFields.ProgId_Default]?.Value; + set => this.Set((int)ClassTupleFields.ProgId_Default, value); + } + + public string Description + { + get => (string)this.Fields[(int)ClassTupleFields.Description]?.Value; + set => this.Set((int)ClassTupleFields.Description, value); + } + + public string AppId_ + { + get => (string)this.Fields[(int)ClassTupleFields.AppId_]?.Value; + set => this.Set((int)ClassTupleFields.AppId_, value); + } + + public string FileTypeMask + { + get => (string)this.Fields[(int)ClassTupleFields.FileTypeMask]?.Value; + set => this.Set((int)ClassTupleFields.FileTypeMask, value); + } + + public string Icon_ + { + get => (string)this.Fields[(int)ClassTupleFields.Icon_]?.Value; + set => this.Set((int)ClassTupleFields.Icon_, value); + } + + public int IconIndex + { + get => (int)this.Fields[(int)ClassTupleFields.IconIndex]?.Value; + set => this.Set((int)ClassTupleFields.IconIndex, value); + } + + public string DefInprocHandler + { + get => (string)this.Fields[(int)ClassTupleFields.DefInprocHandler]?.Value; + set => this.Set((int)ClassTupleFields.DefInprocHandler, value); + } + + public string Argument + { + get => (string)this.Fields[(int)ClassTupleFields.Argument]?.Value; + set => this.Set((int)ClassTupleFields.Argument, value); + } + + public string Feature_ + { + get => (string)this.Fields[(int)ClassTupleFields.Feature_]?.Value; + set => this.Set((int)ClassTupleFields.Feature_, value); + } + + public int Attributes + { + get => (int)this.Fields[(int)ClassTupleFields.Attributes]?.Value; + set => this.Set((int)ClassTupleFields.Attributes, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/ComboBoxTuple.cs b/src/WixToolset.Data/Tuples/ComboBoxTuple.cs new file mode 100644 index 00000000..67acc30c --- /dev/null +++ b/src/WixToolset.Data/Tuples/ComboBoxTuple.cs @@ -0,0 +1,68 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition ComboBox = new IntermediateTupleDefinition( + TupleDefinitionType.ComboBox, + new[] + { + new IntermediateFieldDefinition(nameof(ComboBoxTupleFields.Property), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ComboBoxTupleFields.Order), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(ComboBoxTupleFields.Value), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ComboBoxTupleFields.Text), IntermediateFieldType.String), + }, + typeof(ComboBoxTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum ComboBoxTupleFields + { + Property, + Order, + Value, + Text, + } + + public class ComboBoxTuple : IntermediateTuple + { + public ComboBoxTuple() : base(TupleDefinitions.ComboBox, null, null) + { + } + + public ComboBoxTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.ComboBox, sourceLineNumber, id) + { + } + + public IntermediateField this[ComboBoxTupleFields index] => this.Fields[(int)index]; + + public string Property + { + get => (string)this.Fields[(int)ComboBoxTupleFields.Property]?.Value; + set => this.Set((int)ComboBoxTupleFields.Property, value); + } + + public int Order + { + get => (int)this.Fields[(int)ComboBoxTupleFields.Order]?.Value; + set => this.Set((int)ComboBoxTupleFields.Order, value); + } + + public string Value + { + get => (string)this.Fields[(int)ComboBoxTupleFields.Value]?.Value; + set => this.Set((int)ComboBoxTupleFields.Value, value); + } + + public string Text + { + get => (string)this.Fields[(int)ComboBoxTupleFields.Text]?.Value; + set => this.Set((int)ComboBoxTupleFields.Text, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/CompLocatorTuple.cs b/src/WixToolset.Data/Tuples/CompLocatorTuple.cs new file mode 100644 index 00000000..e8560711 --- /dev/null +++ b/src/WixToolset.Data/Tuples/CompLocatorTuple.cs @@ -0,0 +1,60 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition CompLocator = new IntermediateTupleDefinition( + TupleDefinitionType.CompLocator, + new[] + { + new IntermediateFieldDefinition(nameof(CompLocatorTupleFields.Signature_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(CompLocatorTupleFields.ComponentId), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(CompLocatorTupleFields.Type), IntermediateFieldType.Number), + }, + typeof(CompLocatorTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum CompLocatorTupleFields + { + Signature_, + ComponentId, + Type, + } + + public class CompLocatorTuple : IntermediateTuple + { + public CompLocatorTuple() : base(TupleDefinitions.CompLocator, null, null) + { + } + + public CompLocatorTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.CompLocator, sourceLineNumber, id) + { + } + + public IntermediateField this[CompLocatorTupleFields index] => this.Fields[(int)index]; + + public string Signature_ + { + get => (string)this.Fields[(int)CompLocatorTupleFields.Signature_]?.Value; + set => this.Set((int)CompLocatorTupleFields.Signature_, value); + } + + public string ComponentId + { + get => (string)this.Fields[(int)CompLocatorTupleFields.ComponentId]?.Value; + set => this.Set((int)CompLocatorTupleFields.ComponentId, value); + } + + public int Type + { + get => (int)this.Fields[(int)CompLocatorTupleFields.Type]?.Value; + set => this.Set((int)CompLocatorTupleFields.Type, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/ComplusTuple.cs b/src/WixToolset.Data/Tuples/ComplusTuple.cs new file mode 100644 index 00000000..0287c689 --- /dev/null +++ b/src/WixToolset.Data/Tuples/ComplusTuple.cs @@ -0,0 +1,52 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition Complus = new IntermediateTupleDefinition( + TupleDefinitionType.Complus, + new[] + { + new IntermediateFieldDefinition(nameof(ComplusTupleFields.Component_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ComplusTupleFields.ExpType), IntermediateFieldType.Number), + }, + typeof(ComplusTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum ComplusTupleFields + { + Component_, + ExpType, + } + + public class ComplusTuple : IntermediateTuple + { + public ComplusTuple() : base(TupleDefinitions.Complus, null, null) + { + } + + public ComplusTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.Complus, sourceLineNumber, id) + { + } + + public IntermediateField this[ComplusTupleFields index] => this.Fields[(int)index]; + + public string Component_ + { + get => (string)this.Fields[(int)ComplusTupleFields.Component_]?.Value; + set => this.Set((int)ComplusTupleFields.Component_, value); + } + + public int ExpType + { + get => (int)this.Fields[(int)ComplusTupleFields.ExpType]?.Value; + set => this.Set((int)ComplusTupleFields.ExpType, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/ComponentTuple.cs b/src/WixToolset.Data/Tuples/ComponentTuple.cs new file mode 100644 index 00000000..8d679609 --- /dev/null +++ b/src/WixToolset.Data/Tuples/ComponentTuple.cs @@ -0,0 +1,84 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition Component = new IntermediateTupleDefinition( + TupleDefinitionType.Component, + new[] + { + new IntermediateFieldDefinition(nameof(ComponentTupleFields.Component), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ComponentTupleFields.ComponentId), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ComponentTupleFields.Directory_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ComponentTupleFields.Attributes), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(ComponentTupleFields.Condition), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ComponentTupleFields.KeyPath), IntermediateFieldType.String), + }, + typeof(ComponentTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum ComponentTupleFields + { + Component, + ComponentId, + Directory_, + Attributes, + Condition, + KeyPath, + } + + public class ComponentTuple : IntermediateTuple + { + public ComponentTuple() : base(TupleDefinitions.Component, null, null) + { + } + + public ComponentTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.Component, sourceLineNumber, id) + { + } + + public IntermediateField this[ComponentTupleFields index] => this.Fields[(int)index]; + + public string Component + { + get => (string)this.Fields[(int)ComponentTupleFields.Component]?.Value; + set => this.Set((int)ComponentTupleFields.Component, value); + } + + public string ComponentId + { + get => (string)this.Fields[(int)ComponentTupleFields.ComponentId]?.Value; + set => this.Set((int)ComponentTupleFields.ComponentId, value); + } + + public string Directory_ + { + get => (string)this.Fields[(int)ComponentTupleFields.Directory_]?.Value; + set => this.Set((int)ComponentTupleFields.Directory_, value); + } + + public int Attributes + { + get => (int)this.Fields[(int)ComponentTupleFields.Attributes]?.Value; + set => this.Set((int)ComponentTupleFields.Attributes, value); + } + + public string Condition + { + get => (string)this.Fields[(int)ComponentTupleFields.Condition]?.Value; + set => this.Set((int)ComponentTupleFields.Condition, value); + } + + public string KeyPath + { + get => (string)this.Fields[(int)ComponentTupleFields.KeyPath]?.Value; + set => this.Set((int)ComponentTupleFields.KeyPath, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/ConditionTuple.cs b/src/WixToolset.Data/Tuples/ConditionTuple.cs new file mode 100644 index 00000000..534f4cae --- /dev/null +++ b/src/WixToolset.Data/Tuples/ConditionTuple.cs @@ -0,0 +1,60 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition Condition = new IntermediateTupleDefinition( + TupleDefinitionType.Condition, + new[] + { + new IntermediateFieldDefinition(nameof(ConditionTupleFields.Feature_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ConditionTupleFields.Level), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(ConditionTupleFields.Condition), IntermediateFieldType.String), + }, + typeof(ConditionTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum ConditionTupleFields + { + Feature_, + Level, + Condition, + } + + public class ConditionTuple : IntermediateTuple + { + public ConditionTuple() : base(TupleDefinitions.Condition, null, null) + { + } + + public ConditionTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.Condition, sourceLineNumber, id) + { + } + + public IntermediateField this[ConditionTupleFields index] => this.Fields[(int)index]; + + public string Feature_ + { + get => (string)this.Fields[(int)ConditionTupleFields.Feature_]?.Value; + set => this.Set((int)ConditionTupleFields.Feature_, value); + } + + public int Level + { + get => (int)this.Fields[(int)ConditionTupleFields.Level]?.Value; + set => this.Set((int)ConditionTupleFields.Level, value); + } + + public string Condition + { + get => (string)this.Fields[(int)ConditionTupleFields.Condition]?.Value; + set => this.Set((int)ConditionTupleFields.Condition, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/ControlConditionTuple.cs b/src/WixToolset.Data/Tuples/ControlConditionTuple.cs new file mode 100644 index 00000000..0b18dac1 --- /dev/null +++ b/src/WixToolset.Data/Tuples/ControlConditionTuple.cs @@ -0,0 +1,68 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition ControlCondition = new IntermediateTupleDefinition( + TupleDefinitionType.ControlCondition, + new[] + { + new IntermediateFieldDefinition(nameof(ControlConditionTupleFields.Dialog_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ControlConditionTupleFields.Control_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ControlConditionTupleFields.Action), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ControlConditionTupleFields.Condition), IntermediateFieldType.String), + }, + typeof(ControlConditionTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum ControlConditionTupleFields + { + Dialog_, + Control_, + Action, + Condition, + } + + public class ControlConditionTuple : IntermediateTuple + { + public ControlConditionTuple() : base(TupleDefinitions.ControlCondition, null, null) + { + } + + public ControlConditionTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.ControlCondition, sourceLineNumber, id) + { + } + + public IntermediateField this[ControlConditionTupleFields index] => this.Fields[(int)index]; + + public string Dialog_ + { + get => (string)this.Fields[(int)ControlConditionTupleFields.Dialog_]?.Value; + set => this.Set((int)ControlConditionTupleFields.Dialog_, value); + } + + public string Control_ + { + get => (string)this.Fields[(int)ControlConditionTupleFields.Control_]?.Value; + set => this.Set((int)ControlConditionTupleFields.Control_, value); + } + + public string Action + { + get => (string)this.Fields[(int)ControlConditionTupleFields.Action]?.Value; + set => this.Set((int)ControlConditionTupleFields.Action, value); + } + + public string Condition + { + get => (string)this.Fields[(int)ControlConditionTupleFields.Condition]?.Value; + set => this.Set((int)ControlConditionTupleFields.Condition, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/ControlEventTuple.cs b/src/WixToolset.Data/Tuples/ControlEventTuple.cs new file mode 100644 index 00000000..b44cd19e --- /dev/null +++ b/src/WixToolset.Data/Tuples/ControlEventTuple.cs @@ -0,0 +1,84 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition ControlEvent = new IntermediateTupleDefinition( + TupleDefinitionType.ControlEvent, + new[] + { + new IntermediateFieldDefinition(nameof(ControlEventTupleFields.Dialog_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ControlEventTupleFields.Control_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ControlEventTupleFields.Event), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ControlEventTupleFields.Argument), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ControlEventTupleFields.Condition), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ControlEventTupleFields.Ordering), IntermediateFieldType.Number), + }, + typeof(ControlEventTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum ControlEventTupleFields + { + Dialog_, + Control_, + Event, + Argument, + Condition, + Ordering, + } + + public class ControlEventTuple : IntermediateTuple + { + public ControlEventTuple() : base(TupleDefinitions.ControlEvent, null, null) + { + } + + public ControlEventTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.ControlEvent, sourceLineNumber, id) + { + } + + public IntermediateField this[ControlEventTupleFields index] => this.Fields[(int)index]; + + public string Dialog_ + { + get => (string)this.Fields[(int)ControlEventTupleFields.Dialog_]?.Value; + set => this.Set((int)ControlEventTupleFields.Dialog_, value); + } + + public string Control_ + { + get => (string)this.Fields[(int)ControlEventTupleFields.Control_]?.Value; + set => this.Set((int)ControlEventTupleFields.Control_, value); + } + + public string Event + { + get => (string)this.Fields[(int)ControlEventTupleFields.Event]?.Value; + set => this.Set((int)ControlEventTupleFields.Event, value); + } + + public string Argument + { + get => (string)this.Fields[(int)ControlEventTupleFields.Argument]?.Value; + set => this.Set((int)ControlEventTupleFields.Argument, value); + } + + public string Condition + { + get => (string)this.Fields[(int)ControlEventTupleFields.Condition]?.Value; + set => this.Set((int)ControlEventTupleFields.Condition, value); + } + + public int Ordering + { + get => (int)this.Fields[(int)ControlEventTupleFields.Ordering]?.Value; + set => this.Set((int)ControlEventTupleFields.Ordering, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/ControlTuple.cs b/src/WixToolset.Data/Tuples/ControlTuple.cs new file mode 100644 index 00000000..82de917c --- /dev/null +++ b/src/WixToolset.Data/Tuples/ControlTuple.cs @@ -0,0 +1,132 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition Control = new IntermediateTupleDefinition( + TupleDefinitionType.Control, + new[] + { + new IntermediateFieldDefinition(nameof(ControlTupleFields.Dialog_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ControlTupleFields.Control), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ControlTupleFields.Type), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ControlTupleFields.X), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(ControlTupleFields.Y), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(ControlTupleFields.Width), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(ControlTupleFields.Height), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(ControlTupleFields.Attributes), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(ControlTupleFields.Property), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ControlTupleFields.Text), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ControlTupleFields.Control_Next), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ControlTupleFields.Help), IntermediateFieldType.String), + }, + typeof(ControlTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum ControlTupleFields + { + Dialog_, + Control, + Type, + X, + Y, + Width, + Height, + Attributes, + Property, + Text, + Control_Next, + Help, + } + + public class ControlTuple : IntermediateTuple + { + public ControlTuple() : base(TupleDefinitions.Control, null, null) + { + } + + public ControlTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.Control, sourceLineNumber, id) + { + } + + public IntermediateField this[ControlTupleFields index] => this.Fields[(int)index]; + + public string Dialog_ + { + get => (string)this.Fields[(int)ControlTupleFields.Dialog_]?.Value; + set => this.Set((int)ControlTupleFields.Dialog_, value); + } + + public string Control + { + get => (string)this.Fields[(int)ControlTupleFields.Control]?.Value; + set => this.Set((int)ControlTupleFields.Control, value); + } + + public string Type + { + get => (string)this.Fields[(int)ControlTupleFields.Type]?.Value; + set => this.Set((int)ControlTupleFields.Type, value); + } + + public int X + { + get => (int)this.Fields[(int)ControlTupleFields.X]?.Value; + set => this.Set((int)ControlTupleFields.X, value); + } + + public int Y + { + get => (int)this.Fields[(int)ControlTupleFields.Y]?.Value; + set => this.Set((int)ControlTupleFields.Y, value); + } + + public int Width + { + get => (int)this.Fields[(int)ControlTupleFields.Width]?.Value; + set => this.Set((int)ControlTupleFields.Width, value); + } + + public int Height + { + get => (int)this.Fields[(int)ControlTupleFields.Height]?.Value; + set => this.Set((int)ControlTupleFields.Height, value); + } + + public int Attributes + { + get => (int)this.Fields[(int)ControlTupleFields.Attributes]?.Value; + set => this.Set((int)ControlTupleFields.Attributes, value); + } + + public string Property + { + get => (string)this.Fields[(int)ControlTupleFields.Property]?.Value; + set => this.Set((int)ControlTupleFields.Property, value); + } + + public string Text + { + get => (string)this.Fields[(int)ControlTupleFields.Text]?.Value; + set => this.Set((int)ControlTupleFields.Text, value); + } + + public string Control_Next + { + get => (string)this.Fields[(int)ControlTupleFields.Control_Next]?.Value; + set => this.Set((int)ControlTupleFields.Control_Next, value); + } + + public string Help + { + get => (string)this.Fields[(int)ControlTupleFields.Help]?.Value; + set => this.Set((int)ControlTupleFields.Help, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/CreateFolderTuple.cs b/src/WixToolset.Data/Tuples/CreateFolderTuple.cs new file mode 100644 index 00000000..05b50a8b --- /dev/null +++ b/src/WixToolset.Data/Tuples/CreateFolderTuple.cs @@ -0,0 +1,52 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition CreateFolder = new IntermediateTupleDefinition( + TupleDefinitionType.CreateFolder, + new[] + { + new IntermediateFieldDefinition(nameof(CreateFolderTupleFields.Directory_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(CreateFolderTupleFields.Component_), IntermediateFieldType.String), + }, + typeof(CreateFolderTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum CreateFolderTupleFields + { + Directory_, + Component_, + } + + public class CreateFolderTuple : IntermediateTuple + { + public CreateFolderTuple() : base(TupleDefinitions.CreateFolder, null, null) + { + } + + public CreateFolderTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.CreateFolder, sourceLineNumber, id) + { + } + + public IntermediateField this[CreateFolderTupleFields index] => this.Fields[(int)index]; + + public string Directory_ + { + get => (string)this.Fields[(int)CreateFolderTupleFields.Directory_]?.Value; + set => this.Set((int)CreateFolderTupleFields.Directory_, value); + } + + public string Component_ + { + get => (string)this.Fields[(int)CreateFolderTupleFields.Component_]?.Value; + set => this.Set((int)CreateFolderTupleFields.Component_, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/CustomActionTuple.cs b/src/WixToolset.Data/Tuples/CustomActionTuple.cs new file mode 100644 index 00000000..a5d8fd46 --- /dev/null +++ b/src/WixToolset.Data/Tuples/CustomActionTuple.cs @@ -0,0 +1,76 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition CustomAction = new IntermediateTupleDefinition( + TupleDefinitionType.CustomAction, + new[] + { + new IntermediateFieldDefinition(nameof(CustomActionTupleFields.Action), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(CustomActionTupleFields.Type), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(CustomActionTupleFields.Source), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(CustomActionTupleFields.Target), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(CustomActionTupleFields.ExtendedType), IntermediateFieldType.Number), + }, + typeof(CustomActionTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum CustomActionTupleFields + { + Action, + Type, + Source, + Target, + ExtendedType, + } + + public class CustomActionTuple : IntermediateTuple + { + public CustomActionTuple() : base(TupleDefinitions.CustomAction, null, null) + { + } + + public CustomActionTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.CustomAction, sourceLineNumber, id) + { + } + + public IntermediateField this[CustomActionTupleFields index] => this.Fields[(int)index]; + + public string Action + { + get => (string)this.Fields[(int)CustomActionTupleFields.Action]?.Value; + set => this.Set((int)CustomActionTupleFields.Action, value); + } + + public int Type + { + get => (int)this.Fields[(int)CustomActionTupleFields.Type]?.Value; + set => this.Set((int)CustomActionTupleFields.Type, value); + } + + public string Source + { + get => (string)this.Fields[(int)CustomActionTupleFields.Source]?.Value; + set => this.Set((int)CustomActionTupleFields.Source, value); + } + + public string Target + { + get => (string)this.Fields[(int)CustomActionTupleFields.Target]?.Value; + set => this.Set((int)CustomActionTupleFields.Target, value); + } + + public int ExtendedType + { + get => (int)this.Fields[(int)CustomActionTupleFields.ExtendedType]?.Value; + set => this.Set((int)CustomActionTupleFields.ExtendedType, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/DialogTuple.cs b/src/WixToolset.Data/Tuples/DialogTuple.cs new file mode 100644 index 00000000..b8bb2361 --- /dev/null +++ b/src/WixToolset.Data/Tuples/DialogTuple.cs @@ -0,0 +1,116 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition Dialog = new IntermediateTupleDefinition( + TupleDefinitionType.Dialog, + new[] + { + new IntermediateFieldDefinition(nameof(DialogTupleFields.Dialog), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(DialogTupleFields.HCentering), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(DialogTupleFields.VCentering), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(DialogTupleFields.Width), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(DialogTupleFields.Height), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(DialogTupleFields.Attributes), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(DialogTupleFields.Title), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(DialogTupleFields.Control_First), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(DialogTupleFields.Control_Default), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(DialogTupleFields.Control_Cancel), IntermediateFieldType.String), + }, + typeof(DialogTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum DialogTupleFields + { + Dialog, + HCentering, + VCentering, + Width, + Height, + Attributes, + Title, + Control_First, + Control_Default, + Control_Cancel, + } + + public class DialogTuple : IntermediateTuple + { + public DialogTuple() : base(TupleDefinitions.Dialog, null, null) + { + } + + public DialogTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.Dialog, sourceLineNumber, id) + { + } + + public IntermediateField this[DialogTupleFields index] => this.Fields[(int)index]; + + public string Dialog + { + get => (string)this.Fields[(int)DialogTupleFields.Dialog]?.Value; + set => this.Set((int)DialogTupleFields.Dialog, value); + } + + public int HCentering + { + get => (int)this.Fields[(int)DialogTupleFields.HCentering]?.Value; + set => this.Set((int)DialogTupleFields.HCentering, value); + } + + public int VCentering + { + get => (int)this.Fields[(int)DialogTupleFields.VCentering]?.Value; + set => this.Set((int)DialogTupleFields.VCentering, value); + } + + public int Width + { + get => (int)this.Fields[(int)DialogTupleFields.Width]?.Value; + set => this.Set((int)DialogTupleFields.Width, value); + } + + public int Height + { + get => (int)this.Fields[(int)DialogTupleFields.Height]?.Value; + set => this.Set((int)DialogTupleFields.Height, value); + } + + public int Attributes + { + get => (int)this.Fields[(int)DialogTupleFields.Attributes]?.Value; + set => this.Set((int)DialogTupleFields.Attributes, value); + } + + public string Title + { + get => (string)this.Fields[(int)DialogTupleFields.Title]?.Value; + set => this.Set((int)DialogTupleFields.Title, value); + } + + public string Control_First + { + get => (string)this.Fields[(int)DialogTupleFields.Control_First]?.Value; + set => this.Set((int)DialogTupleFields.Control_First, value); + } + + public string Control_Default + { + get => (string)this.Fields[(int)DialogTupleFields.Control_Default]?.Value; + set => this.Set((int)DialogTupleFields.Control_Default, value); + } + + public string Control_Cancel + { + get => (string)this.Fields[(int)DialogTupleFields.Control_Cancel]?.Value; + set => this.Set((int)DialogTupleFields.Control_Cancel, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/DirectoryTuple.cs b/src/WixToolset.Data/Tuples/DirectoryTuple.cs new file mode 100644 index 00000000..b36345c7 --- /dev/null +++ b/src/WixToolset.Data/Tuples/DirectoryTuple.cs @@ -0,0 +1,60 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition Directory = new IntermediateTupleDefinition( + TupleDefinitionType.Directory, + new[] + { + new IntermediateFieldDefinition(nameof(DirectoryTupleFields.Directory), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(DirectoryTupleFields.Directory_Parent), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(DirectoryTupleFields.DefaultDir), IntermediateFieldType.String), + }, + typeof(DirectoryTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum DirectoryTupleFields + { + Directory, + Directory_Parent, + DefaultDir, + } + + public class DirectoryTuple : IntermediateTuple + { + public DirectoryTuple() : base(TupleDefinitions.Directory, null, null) + { + } + + public DirectoryTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.Directory, sourceLineNumber, id) + { + } + + public IntermediateField this[DirectoryTupleFields index] => this.Fields[(int)index]; + + public string Directory + { + get => (string)this.Fields[(int)DirectoryTupleFields.Directory]?.Value; + set => this.Set((int)DirectoryTupleFields.Directory, value); + } + + public string Directory_Parent + { + get => (string)this.Fields[(int)DirectoryTupleFields.Directory_Parent]?.Value; + set => this.Set((int)DirectoryTupleFields.Directory_Parent, value); + } + + public string DefaultDir + { + get => (string)this.Fields[(int)DirectoryTupleFields.DefaultDir]?.Value; + set => this.Set((int)DirectoryTupleFields.DefaultDir, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/DrLocatorTuple.cs b/src/WixToolset.Data/Tuples/DrLocatorTuple.cs new file mode 100644 index 00000000..38910333 --- /dev/null +++ b/src/WixToolset.Data/Tuples/DrLocatorTuple.cs @@ -0,0 +1,68 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition DrLocator = new IntermediateTupleDefinition( + TupleDefinitionType.DrLocator, + new[] + { + new IntermediateFieldDefinition(nameof(DrLocatorTupleFields.Signature_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(DrLocatorTupleFields.Parent), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(DrLocatorTupleFields.Path), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(DrLocatorTupleFields.Depth), IntermediateFieldType.Number), + }, + typeof(DrLocatorTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum DrLocatorTupleFields + { + Signature_, + Parent, + Path, + Depth, + } + + public class DrLocatorTuple : IntermediateTuple + { + public DrLocatorTuple() : base(TupleDefinitions.DrLocator, null, null) + { + } + + public DrLocatorTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.DrLocator, sourceLineNumber, id) + { + } + + public IntermediateField this[DrLocatorTupleFields index] => this.Fields[(int)index]; + + public string Signature_ + { + get => (string)this.Fields[(int)DrLocatorTupleFields.Signature_]?.Value; + set => this.Set((int)DrLocatorTupleFields.Signature_, value); + } + + public string Parent + { + get => (string)this.Fields[(int)DrLocatorTupleFields.Parent]?.Value; + set => this.Set((int)DrLocatorTupleFields.Parent, value); + } + + public string Path + { + get => (string)this.Fields[(int)DrLocatorTupleFields.Path]?.Value; + set => this.Set((int)DrLocatorTupleFields.Path, value); + } + + public int Depth + { + get => (int)this.Fields[(int)DrLocatorTupleFields.Depth]?.Value; + set => this.Set((int)DrLocatorTupleFields.Depth, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/DuplicateFileTuple.cs b/src/WixToolset.Data/Tuples/DuplicateFileTuple.cs new file mode 100644 index 00000000..b489025c --- /dev/null +++ b/src/WixToolset.Data/Tuples/DuplicateFileTuple.cs @@ -0,0 +1,76 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition DuplicateFile = new IntermediateTupleDefinition( + TupleDefinitionType.DuplicateFile, + new[] + { + new IntermediateFieldDefinition(nameof(DuplicateFileTupleFields.FileKey), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(DuplicateFileTupleFields.Component_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(DuplicateFileTupleFields.File_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(DuplicateFileTupleFields.DestName), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(DuplicateFileTupleFields.DestFolder), IntermediateFieldType.String), + }, + typeof(DuplicateFileTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum DuplicateFileTupleFields + { + FileKey, + Component_, + File_, + DestName, + DestFolder, + } + + public class DuplicateFileTuple : IntermediateTuple + { + public DuplicateFileTuple() : base(TupleDefinitions.DuplicateFile, null, null) + { + } + + public DuplicateFileTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.DuplicateFile, sourceLineNumber, id) + { + } + + public IntermediateField this[DuplicateFileTupleFields index] => this.Fields[(int)index]; + + public string FileKey + { + get => (string)this.Fields[(int)DuplicateFileTupleFields.FileKey]?.Value; + set => this.Set((int)DuplicateFileTupleFields.FileKey, value); + } + + public string Component_ + { + get => (string)this.Fields[(int)DuplicateFileTupleFields.Component_]?.Value; + set => this.Set((int)DuplicateFileTupleFields.Component_, value); + } + + public string File_ + { + get => (string)this.Fields[(int)DuplicateFileTupleFields.File_]?.Value; + set => this.Set((int)DuplicateFileTupleFields.File_, value); + } + + public string DestName + { + get => (string)this.Fields[(int)DuplicateFileTupleFields.DestName]?.Value; + set => this.Set((int)DuplicateFileTupleFields.DestName, value); + } + + public string DestFolder + { + get => (string)this.Fields[(int)DuplicateFileTupleFields.DestFolder]?.Value; + set => this.Set((int)DuplicateFileTupleFields.DestFolder, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/EnvironmentTuple.cs b/src/WixToolset.Data/Tuples/EnvironmentTuple.cs new file mode 100644 index 00000000..9ee05a19 --- /dev/null +++ b/src/WixToolset.Data/Tuples/EnvironmentTuple.cs @@ -0,0 +1,68 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition Environment = new IntermediateTupleDefinition( + TupleDefinitionType.Environment, + new[] + { + new IntermediateFieldDefinition(nameof(EnvironmentTupleFields.Environment), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(EnvironmentTupleFields.Name), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(EnvironmentTupleFields.Value), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(EnvironmentTupleFields.Component_), IntermediateFieldType.String), + }, + typeof(EnvironmentTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum EnvironmentTupleFields + { + Environment, + Name, + Value, + Component_, + } + + public class EnvironmentTuple : IntermediateTuple + { + public EnvironmentTuple() : base(TupleDefinitions.Environment, null, null) + { + } + + public EnvironmentTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.Environment, sourceLineNumber, id) + { + } + + public IntermediateField this[EnvironmentTupleFields index] => this.Fields[(int)index]; + + public string Environment + { + get => (string)this.Fields[(int)EnvironmentTupleFields.Environment]?.Value; + set => this.Set((int)EnvironmentTupleFields.Environment, value); + } + + public string Name + { + get => (string)this.Fields[(int)EnvironmentTupleFields.Name]?.Value; + set => this.Set((int)EnvironmentTupleFields.Name, value); + } + + public string Value + { + get => (string)this.Fields[(int)EnvironmentTupleFields.Value]?.Value; + set => this.Set((int)EnvironmentTupleFields.Value, value); + } + + public string Component_ + { + get => (string)this.Fields[(int)EnvironmentTupleFields.Component_]?.Value; + set => this.Set((int)EnvironmentTupleFields.Component_, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/ErrorTuple.cs b/src/WixToolset.Data/Tuples/ErrorTuple.cs new file mode 100644 index 00000000..393d2d29 --- /dev/null +++ b/src/WixToolset.Data/Tuples/ErrorTuple.cs @@ -0,0 +1,52 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition Error = new IntermediateTupleDefinition( + TupleDefinitionType.Error, + new[] + { + new IntermediateFieldDefinition(nameof(ErrorTupleFields.Error), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(ErrorTupleFields.Message), IntermediateFieldType.String), + }, + typeof(ErrorTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum ErrorTupleFields + { + Error, + Message, + } + + public class ErrorTuple : IntermediateTuple + { + public ErrorTuple() : base(TupleDefinitions.Error, null, null) + { + } + + public ErrorTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.Error, sourceLineNumber, id) + { + } + + public IntermediateField this[ErrorTupleFields index] => this.Fields[(int)index]; + + public int Error + { + get => (int)this.Fields[(int)ErrorTupleFields.Error]?.Value; + set => this.Set((int)ErrorTupleFields.Error, value); + } + + public string Message + { + get => (string)this.Fields[(int)ErrorTupleFields.Message]?.Value; + set => this.Set((int)ErrorTupleFields.Message, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/EventMappingTuple.cs b/src/WixToolset.Data/Tuples/EventMappingTuple.cs new file mode 100644 index 00000000..e0e8da71 --- /dev/null +++ b/src/WixToolset.Data/Tuples/EventMappingTuple.cs @@ -0,0 +1,68 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition EventMapping = new IntermediateTupleDefinition( + TupleDefinitionType.EventMapping, + new[] + { + new IntermediateFieldDefinition(nameof(EventMappingTupleFields.Dialog_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(EventMappingTupleFields.Control_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(EventMappingTupleFields.Event), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(EventMappingTupleFields.Attribute), IntermediateFieldType.String), + }, + typeof(EventMappingTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum EventMappingTupleFields + { + Dialog_, + Control_, + Event, + Attribute, + } + + public class EventMappingTuple : IntermediateTuple + { + public EventMappingTuple() : base(TupleDefinitions.EventMapping, null, null) + { + } + + public EventMappingTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.EventMapping, sourceLineNumber, id) + { + } + + public IntermediateField this[EventMappingTupleFields index] => this.Fields[(int)index]; + + public string Dialog_ + { + get => (string)this.Fields[(int)EventMappingTupleFields.Dialog_]?.Value; + set => this.Set((int)EventMappingTupleFields.Dialog_, value); + } + + public string Control_ + { + get => (string)this.Fields[(int)EventMappingTupleFields.Control_]?.Value; + set => this.Set((int)EventMappingTupleFields.Control_, value); + } + + public string Event + { + get => (string)this.Fields[(int)EventMappingTupleFields.Event]?.Value; + set => this.Set((int)EventMappingTupleFields.Event, value); + } + + public string Attribute + { + get => (string)this.Fields[(int)EventMappingTupleFields.Attribute]?.Value; + set => this.Set((int)EventMappingTupleFields.Attribute, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/ExtensionTuple.cs b/src/WixToolset.Data/Tuples/ExtensionTuple.cs new file mode 100644 index 00000000..e3ef1675 --- /dev/null +++ b/src/WixToolset.Data/Tuples/ExtensionTuple.cs @@ -0,0 +1,76 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition Extension = new IntermediateTupleDefinition( + TupleDefinitionType.Extension, + new[] + { + new IntermediateFieldDefinition(nameof(ExtensionTupleFields.Extension), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ExtensionTupleFields.Component_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ExtensionTupleFields.ProgId_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ExtensionTupleFields.MIME_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ExtensionTupleFields.Feature_), IntermediateFieldType.String), + }, + typeof(ExtensionTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum ExtensionTupleFields + { + Extension, + Component_, + ProgId_, + MIME_, + Feature_, + } + + public class ExtensionTuple : IntermediateTuple + { + public ExtensionTuple() : base(TupleDefinitions.Extension, null, null) + { + } + + public ExtensionTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.Extension, sourceLineNumber, id) + { + } + + public IntermediateField this[ExtensionTupleFields index] => this.Fields[(int)index]; + + public string Extension + { + get => (string)this.Fields[(int)ExtensionTupleFields.Extension]?.Value; + set => this.Set((int)ExtensionTupleFields.Extension, value); + } + + public string Component_ + { + get => (string)this.Fields[(int)ExtensionTupleFields.Component_]?.Value; + set => this.Set((int)ExtensionTupleFields.Component_, value); + } + + public string ProgId_ + { + get => (string)this.Fields[(int)ExtensionTupleFields.ProgId_]?.Value; + set => this.Set((int)ExtensionTupleFields.ProgId_, value); + } + + public string MIME_ + { + get => (string)this.Fields[(int)ExtensionTupleFields.MIME_]?.Value; + set => this.Set((int)ExtensionTupleFields.MIME_, value); + } + + public string Feature_ + { + get => (string)this.Fields[(int)ExtensionTupleFields.Feature_]?.Value; + set => this.Set((int)ExtensionTupleFields.Feature_, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/ExternalFilesTuple.cs b/src/WixToolset.Data/Tuples/ExternalFilesTuple.cs new file mode 100644 index 00000000..06e6d4ae --- /dev/null +++ b/src/WixToolset.Data/Tuples/ExternalFilesTuple.cs @@ -0,0 +1,100 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition ExternalFiles = new IntermediateTupleDefinition( + TupleDefinitionType.ExternalFiles, + new[] + { + new IntermediateFieldDefinition(nameof(ExternalFilesTupleFields.Family), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ExternalFilesTupleFields.FTK), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ExternalFilesTupleFields.FilePath), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ExternalFilesTupleFields.SymbolPaths), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ExternalFilesTupleFields.IgnoreOffsets), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ExternalFilesTupleFields.IgnoreLengths), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ExternalFilesTupleFields.RetainOffsets), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ExternalFilesTupleFields.Order), IntermediateFieldType.Number), + }, + typeof(ExternalFilesTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum ExternalFilesTupleFields + { + Family, + FTK, + FilePath, + SymbolPaths, + IgnoreOffsets, + IgnoreLengths, + RetainOffsets, + Order, + } + + public class ExternalFilesTuple : IntermediateTuple + { + public ExternalFilesTuple() : base(TupleDefinitions.ExternalFiles, null, null) + { + } + + public ExternalFilesTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.ExternalFiles, sourceLineNumber, id) + { + } + + public IntermediateField this[ExternalFilesTupleFields index] => this.Fields[(int)index]; + + public string Family + { + get => (string)this.Fields[(int)ExternalFilesTupleFields.Family]?.Value; + set => this.Set((int)ExternalFilesTupleFields.Family, value); + } + + public string FTK + { + get => (string)this.Fields[(int)ExternalFilesTupleFields.FTK]?.Value; + set => this.Set((int)ExternalFilesTupleFields.FTK, value); + } + + public string FilePath + { + get => (string)this.Fields[(int)ExternalFilesTupleFields.FilePath]?.Value; + set => this.Set((int)ExternalFilesTupleFields.FilePath, value); + } + + public string SymbolPaths + { + get => (string)this.Fields[(int)ExternalFilesTupleFields.SymbolPaths]?.Value; + set => this.Set((int)ExternalFilesTupleFields.SymbolPaths, value); + } + + public string IgnoreOffsets + { + get => (string)this.Fields[(int)ExternalFilesTupleFields.IgnoreOffsets]?.Value; + set => this.Set((int)ExternalFilesTupleFields.IgnoreOffsets, value); + } + + public string IgnoreLengths + { + get => (string)this.Fields[(int)ExternalFilesTupleFields.IgnoreLengths]?.Value; + set => this.Set((int)ExternalFilesTupleFields.IgnoreLengths, value); + } + + public string RetainOffsets + { + get => (string)this.Fields[(int)ExternalFilesTupleFields.RetainOffsets]?.Value; + set => this.Set((int)ExternalFilesTupleFields.RetainOffsets, value); + } + + public int Order + { + get => (int)this.Fields[(int)ExternalFilesTupleFields.Order]?.Value; + set => this.Set((int)ExternalFilesTupleFields.Order, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/FamilyFileRangesTuple.cs b/src/WixToolset.Data/Tuples/FamilyFileRangesTuple.cs new file mode 100644 index 00000000..5065c389 --- /dev/null +++ b/src/WixToolset.Data/Tuples/FamilyFileRangesTuple.cs @@ -0,0 +1,68 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition FamilyFileRanges = new IntermediateTupleDefinition( + TupleDefinitionType.FamilyFileRanges, + new[] + { + new IntermediateFieldDefinition(nameof(FamilyFileRangesTupleFields.Family), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(FamilyFileRangesTupleFields.FTK), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(FamilyFileRangesTupleFields.RetainOffsets), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(FamilyFileRangesTupleFields.RetainLengths), IntermediateFieldType.String), + }, + typeof(FamilyFileRangesTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum FamilyFileRangesTupleFields + { + Family, + FTK, + RetainOffsets, + RetainLengths, + } + + public class FamilyFileRangesTuple : IntermediateTuple + { + public FamilyFileRangesTuple() : base(TupleDefinitions.FamilyFileRanges, null, null) + { + } + + public FamilyFileRangesTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.FamilyFileRanges, sourceLineNumber, id) + { + } + + public IntermediateField this[FamilyFileRangesTupleFields index] => this.Fields[(int)index]; + + public string Family + { + get => (string)this.Fields[(int)FamilyFileRangesTupleFields.Family]?.Value; + set => this.Set((int)FamilyFileRangesTupleFields.Family, value); + } + + public string FTK + { + get => (string)this.Fields[(int)FamilyFileRangesTupleFields.FTK]?.Value; + set => this.Set((int)FamilyFileRangesTupleFields.FTK, value); + } + + public string RetainOffsets + { + get => (string)this.Fields[(int)FamilyFileRangesTupleFields.RetainOffsets]?.Value; + set => this.Set((int)FamilyFileRangesTupleFields.RetainOffsets, value); + } + + public string RetainLengths + { + get => (string)this.Fields[(int)FamilyFileRangesTupleFields.RetainLengths]?.Value; + set => this.Set((int)FamilyFileRangesTupleFields.RetainLengths, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/FeatureComponentsTuple.cs b/src/WixToolset.Data/Tuples/FeatureComponentsTuple.cs new file mode 100644 index 00000000..e9d54c37 --- /dev/null +++ b/src/WixToolset.Data/Tuples/FeatureComponentsTuple.cs @@ -0,0 +1,52 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition FeatureComponents = new IntermediateTupleDefinition( + TupleDefinitionType.FeatureComponents, + new[] + { + new IntermediateFieldDefinition(nameof(FeatureComponentsTupleFields.Feature_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(FeatureComponentsTupleFields.Component_), IntermediateFieldType.String), + }, + typeof(FeatureComponentsTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum FeatureComponentsTupleFields + { + Feature_, + Component_, + } + + public class FeatureComponentsTuple : IntermediateTuple + { + public FeatureComponentsTuple() : base(TupleDefinitions.FeatureComponents, null, null) + { + } + + public FeatureComponentsTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.FeatureComponents, sourceLineNumber, id) + { + } + + public IntermediateField this[FeatureComponentsTupleFields index] => this.Fields[(int)index]; + + public string Feature_ + { + get => (string)this.Fields[(int)FeatureComponentsTupleFields.Feature_]?.Value; + set => this.Set((int)FeatureComponentsTupleFields.Feature_, value); + } + + public string Component_ + { + get => (string)this.Fields[(int)FeatureComponentsTupleFields.Component_]?.Value; + set => this.Set((int)FeatureComponentsTupleFields.Component_, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/FeatureTuple.cs b/src/WixToolset.Data/Tuples/FeatureTuple.cs new file mode 100644 index 00000000..a04c339b --- /dev/null +++ b/src/WixToolset.Data/Tuples/FeatureTuple.cs @@ -0,0 +1,100 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition Feature = new IntermediateTupleDefinition( + TupleDefinitionType.Feature, + new[] + { + new IntermediateFieldDefinition(nameof(FeatureTupleFields.Feature), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(FeatureTupleFields.Feature_Parent), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(FeatureTupleFields.Title), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(FeatureTupleFields.Description), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(FeatureTupleFields.Display), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(FeatureTupleFields.Level), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(FeatureTupleFields.Directory_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(FeatureTupleFields.Attributes), IntermediateFieldType.Number), + }, + typeof(FeatureTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum FeatureTupleFields + { + Feature, + Feature_Parent, + Title, + Description, + Display, + Level, + Directory_, + Attributes, + } + + public class FeatureTuple : IntermediateTuple + { + public FeatureTuple() : base(TupleDefinitions.Feature, null, null) + { + } + + public FeatureTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.Feature, sourceLineNumber, id) + { + } + + public IntermediateField this[FeatureTupleFields index] => this.Fields[(int)index]; + + public string Feature + { + get => (string)this.Fields[(int)FeatureTupleFields.Feature]?.Value; + set => this.Set((int)FeatureTupleFields.Feature, value); + } + + public string Feature_Parent + { + get => (string)this.Fields[(int)FeatureTupleFields.Feature_Parent]?.Value; + set => this.Set((int)FeatureTupleFields.Feature_Parent, value); + } + + public string Title + { + get => (string)this.Fields[(int)FeatureTupleFields.Title]?.Value; + set => this.Set((int)FeatureTupleFields.Title, value); + } + + public string Description + { + get => (string)this.Fields[(int)FeatureTupleFields.Description]?.Value; + set => this.Set((int)FeatureTupleFields.Description, value); + } + + public int Display + { + get => (int)this.Fields[(int)FeatureTupleFields.Display]?.Value; + set => this.Set((int)FeatureTupleFields.Display, value); + } + + public int Level + { + get => (int)this.Fields[(int)FeatureTupleFields.Level]?.Value; + set => this.Set((int)FeatureTupleFields.Level, value); + } + + public string Directory_ + { + get => (string)this.Fields[(int)FeatureTupleFields.Directory_]?.Value; + set => this.Set((int)FeatureTupleFields.Directory_, value); + } + + public int Attributes + { + get => (int)this.Fields[(int)FeatureTupleFields.Attributes]?.Value; + set => this.Set((int)FeatureTupleFields.Attributes, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/FileSFPCatalogTuple.cs b/src/WixToolset.Data/Tuples/FileSFPCatalogTuple.cs new file mode 100644 index 00000000..7409577f --- /dev/null +++ b/src/WixToolset.Data/Tuples/FileSFPCatalogTuple.cs @@ -0,0 +1,52 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition FileSFPCatalog = new IntermediateTupleDefinition( + TupleDefinitionType.FileSFPCatalog, + new[] + { + new IntermediateFieldDefinition(nameof(FileSFPCatalogTupleFields.File_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(FileSFPCatalogTupleFields.SFPCatalog_), IntermediateFieldType.String), + }, + typeof(FileSFPCatalogTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum FileSFPCatalogTupleFields + { + File_, + SFPCatalog_, + } + + public class FileSFPCatalogTuple : IntermediateTuple + { + public FileSFPCatalogTuple() : base(TupleDefinitions.FileSFPCatalog, null, null) + { + } + + public FileSFPCatalogTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.FileSFPCatalog, sourceLineNumber, id) + { + } + + public IntermediateField this[FileSFPCatalogTupleFields index] => this.Fields[(int)index]; + + public string File_ + { + get => (string)this.Fields[(int)FileSFPCatalogTupleFields.File_]?.Value; + set => this.Set((int)FileSFPCatalogTupleFields.File_, value); + } + + public string SFPCatalog_ + { + get => (string)this.Fields[(int)FileSFPCatalogTupleFields.SFPCatalog_]?.Value; + set => this.Set((int)FileSFPCatalogTupleFields.SFPCatalog_, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/FileTuple.cs b/src/WixToolset.Data/Tuples/FileTuple.cs new file mode 100644 index 00000000..6c184b63 --- /dev/null +++ b/src/WixToolset.Data/Tuples/FileTuple.cs @@ -0,0 +1,140 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition File = new IntermediateTupleDefinition( + TupleDefinitionType.File, + new[] + { + new IntermediateFieldDefinition(nameof(FileTupleFields.File), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(FileTupleFields.Component_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(FileTupleFields.ShortFileName), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(FileTupleFields.LongFileName), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(FileTupleFields.FileSize), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(FileTupleFields.Version), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(FileTupleFields.Language), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(FileTupleFieldsOriginal.ReadOnly), IntermediateFieldType.Bool), + new IntermediateFieldDefinition(nameof(FileTupleFieldsOriginal.Hidden), IntermediateFieldType.Bool), + new IntermediateFieldDefinition(nameof(FileTupleFieldsOriginal.System), IntermediateFieldType.Bool), + new IntermediateFieldDefinition(nameof(FileTupleFieldsOriginal.Vital), IntermediateFieldType.Bool), + new IntermediateFieldDefinition(nameof(FileTupleFieldsOriginal.Checksum), IntermediateFieldType.Bool), + new IntermediateFieldDefinition(nameof(FileTupleFieldsOriginal.Compressed), IntermediateFieldType.Bool), + }, + typeof(FileTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum FileTupleFields + { + File, + Component_, + ShortFileName, + LongFileName, + FileSize, + Version, + Language, + ReadOnly, + Hidden, + System, + Vital, + Checksum, + Compressed, + } + + public class FileTuple : IntermediateTuple + { + public FileTuple() : base(TupleDefinitions.File, null, null) + { + } + + public FileTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.File, sourceLineNumber, id) + { + } + + public IntermediateField this[FileTupleFields index] => this.Fields[(int)index]; + + public string File + { + get => (string)this.Fields[(int)FileTupleFields.File]?.Value; + set => this.Set((int)FileTupleFields.File, value); + } + + public string Component_ + { + get => (string)this.Fields[(int)FileTupleFields.Component_]?.Value; + set => this.Set((int)FileTupleFields.Component_, value); + } + + public string ShortFileName + { + get => (string)this.Fields[(int)FileTupleFields.ShortFileName]?.Value; + set => this.Set((int)FileTupleFields.ShortFileName, value); + } + + public string LongFileName + { + get => (string)this.Fields[(int)FileTupleFields.LongFileName]?.Value; + set => this.Set((int)FileTupleFields.LongFileName, value); + } + + public int FileSize + { + get => (int)this.Fields[(int)FileTupleFields.FileSize]?.Value; + set => this.Set((int)FileTupleFields.FileSize, value); + } + + public string Version + { + get => (string)this.Fields[(int)FileTupleFields.Version]?.Value; + set => this.Set((int)FileTupleFields.Version, value); + } + + public string Language + { + get => (string)this.Fields[(int)FileTupleFields.Language]?.Value; + set => this.Set((int)FileTupleFields.Language, value); + } + + public bool ReadOnly + { + get => (bool)this.Fields[(int)FileTupleFields.ReadOnly]?.Value; + set => this.Set((int)FileTupleFields.ReadOnly, value); + } + + public bool Hidden + { + get => (bool)this.Fields[(int)FileTupleFields.Hidden]?.Value; + set => this.Set((int)FileTupleFields.Hidden, value); + } + + public bool System + { + get => (bool)this.Fields[(int)FileTupleFields.System]?.Value; + set => this.Set((int)FileTupleFields.System, value); + } + + public bool Vital + { + get => (bool)this.Fields[(int)FileTupleFields.Vital]?.Value; + set => this.Set((int)FileTupleFields.Vital, value); + } + + public bool Checksum + { + get => (bool)this.Fields[(int)FileTupleFields.Checksum]?.Value; + set => this.Set((int)FileTupleFields.Checksum, value); + } + + public bool? Compressed + { + get => (bool?)this.Fields[(int)FileTupleFields.Compressed]?.Value; + set => this.Set((int)FileTupleFields.Compressed, value); + } + } +} diff --git a/src/WixToolset.Data/Tuples/FontTuple.cs b/src/WixToolset.Data/Tuples/FontTuple.cs new file mode 100644 index 00000000..97550148 --- /dev/null +++ b/src/WixToolset.Data/Tuples/FontTuple.cs @@ -0,0 +1,52 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition Font = new IntermediateTupleDefinition( + TupleDefinitionType.Font, + new[] + { + new IntermediateFieldDefinition(nameof(FontTupleFields.File_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(FontTupleFields.FontTitle), IntermediateFieldType.String), + }, + typeof(FontTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum FontTupleFields + { + File_, + FontTitle, + } + + public class FontTuple : IntermediateTuple + { + public FontTuple() : base(TupleDefinitions.Font, null, null) + { + } + + public FontTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.Font, sourceLineNumber, id) + { + } + + public IntermediateField this[FontTupleFields index] => this.Fields[(int)index]; + + public string File_ + { + get => (string)this.Fields[(int)FontTupleFields.File_]?.Value; + set => this.Set((int)FontTupleFields.File_, value); + } + + public string FontTitle + { + get => (string)this.Fields[(int)FontTupleFields.FontTitle]?.Value; + set => this.Set((int)FontTupleFields.FontTitle, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/IconTuple.cs b/src/WixToolset.Data/Tuples/IconTuple.cs new file mode 100644 index 00000000..0ccd9a53 --- /dev/null +++ b/src/WixToolset.Data/Tuples/IconTuple.cs @@ -0,0 +1,52 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition Icon = new IntermediateTupleDefinition( + TupleDefinitionType.Icon, + new[] + { + new IntermediateFieldDefinition(nameof(IconTupleFields.Name), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(IconTupleFields.Data), IntermediateFieldType.Path), + }, + typeof(IconTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum IconTupleFields + { + Name, + Data, + } + + public class IconTuple : IntermediateTuple + { + public IconTuple() : base(TupleDefinitions.Icon, null, null) + { + } + + public IconTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.Icon, sourceLineNumber, id) + { + } + + public IntermediateField this[IconTupleFields index] => this.Fields[(int)index]; + + public string Name + { + get => (string)this.Fields[(int)IconTupleFields.Name]?.Value; + set => this.Set((int)IconTupleFields.Name, value); + } + + public string Data + { + get => (string)this.Fields[(int)IconTupleFields.Data]?.Value; + set => this.Set((int)IconTupleFields.Data, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/ImageFamiliesTuple.cs b/src/WixToolset.Data/Tuples/ImageFamiliesTuple.cs new file mode 100644 index 00000000..7ce884ca --- /dev/null +++ b/src/WixToolset.Data/Tuples/ImageFamiliesTuple.cs @@ -0,0 +1,84 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition ImageFamilies = new IntermediateTupleDefinition( + TupleDefinitionType.ImageFamilies, + new[] + { + new IntermediateFieldDefinition(nameof(ImageFamiliesTupleFields.Family), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ImageFamiliesTupleFields.MediaSrcPropName), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ImageFamiliesTupleFields.MediaDiskId), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(ImageFamiliesTupleFields.FileSequenceStart), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(ImageFamiliesTupleFields.DiskPrompt), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ImageFamiliesTupleFields.VolumeLabel), IntermediateFieldType.String), + }, + typeof(ImageFamiliesTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum ImageFamiliesTupleFields + { + Family, + MediaSrcPropName, + MediaDiskId, + FileSequenceStart, + DiskPrompt, + VolumeLabel, + } + + public class ImageFamiliesTuple : IntermediateTuple + { + public ImageFamiliesTuple() : base(TupleDefinitions.ImageFamilies, null, null) + { + } + + public ImageFamiliesTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.ImageFamilies, sourceLineNumber, id) + { + } + + public IntermediateField this[ImageFamiliesTupleFields index] => this.Fields[(int)index]; + + public string Family + { + get => (string)this.Fields[(int)ImageFamiliesTupleFields.Family]?.Value; + set => this.Set((int)ImageFamiliesTupleFields.Family, value); + } + + public string MediaSrcPropName + { + get => (string)this.Fields[(int)ImageFamiliesTupleFields.MediaSrcPropName]?.Value; + set => this.Set((int)ImageFamiliesTupleFields.MediaSrcPropName, value); + } + + public int MediaDiskId + { + get => (int)this.Fields[(int)ImageFamiliesTupleFields.MediaDiskId]?.Value; + set => this.Set((int)ImageFamiliesTupleFields.MediaDiskId, value); + } + + public int FileSequenceStart + { + get => (int)this.Fields[(int)ImageFamiliesTupleFields.FileSequenceStart]?.Value; + set => this.Set((int)ImageFamiliesTupleFields.FileSequenceStart, value); + } + + public string DiskPrompt + { + get => (string)this.Fields[(int)ImageFamiliesTupleFields.DiskPrompt]?.Value; + set => this.Set((int)ImageFamiliesTupleFields.DiskPrompt, value); + } + + public string VolumeLabel + { + get => (string)this.Fields[(int)ImageFamiliesTupleFields.VolumeLabel]?.Value; + set => this.Set((int)ImageFamiliesTupleFields.VolumeLabel, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/IniFileTuple.cs b/src/WixToolset.Data/Tuples/IniFileTuple.cs new file mode 100644 index 00000000..29fb3264 --- /dev/null +++ b/src/WixToolset.Data/Tuples/IniFileTuple.cs @@ -0,0 +1,100 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition IniFile = new IntermediateTupleDefinition( + TupleDefinitionType.IniFile, + new[] + { + new IntermediateFieldDefinition(nameof(IniFileTupleFields.IniFile), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(IniFileTupleFields.FileName), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(IniFileTupleFields.DirProperty), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(IniFileTupleFields.Section), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(IniFileTupleFields.Key), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(IniFileTupleFields.Value), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(IniFileTupleFields.Action), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(IniFileTupleFields.Component_), IntermediateFieldType.String), + }, + typeof(IniFileTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum IniFileTupleFields + { + IniFile, + FileName, + DirProperty, + Section, + Key, + Value, + Action, + Component_, + } + + public class IniFileTuple : IntermediateTuple + { + public IniFileTuple() : base(TupleDefinitions.IniFile, null, null) + { + } + + public IniFileTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.IniFile, sourceLineNumber, id) + { + } + + public IntermediateField this[IniFileTupleFields index] => this.Fields[(int)index]; + + public string IniFile + { + get => (string)this.Fields[(int)IniFileTupleFields.IniFile]?.Value; + set => this.Set((int)IniFileTupleFields.IniFile, value); + } + + public string FileName + { + get => (string)this.Fields[(int)IniFileTupleFields.FileName]?.Value; + set => this.Set((int)IniFileTupleFields.FileName, value); + } + + public string DirProperty + { + get => (string)this.Fields[(int)IniFileTupleFields.DirProperty]?.Value; + set => this.Set((int)IniFileTupleFields.DirProperty, value); + } + + public string Section + { + get => (string)this.Fields[(int)IniFileTupleFields.Section]?.Value; + set => this.Set((int)IniFileTupleFields.Section, value); + } + + public string Key + { + get => (string)this.Fields[(int)IniFileTupleFields.Key]?.Value; + set => this.Set((int)IniFileTupleFields.Key, value); + } + + public string Value + { + get => (string)this.Fields[(int)IniFileTupleFields.Value]?.Value; + set => this.Set((int)IniFileTupleFields.Value, value); + } + + public int Action + { + get => (int)this.Fields[(int)IniFileTupleFields.Action]?.Value; + set => this.Set((int)IniFileTupleFields.Action, value); + } + + public string Component_ + { + get => (string)this.Fields[(int)IniFileTupleFields.Component_]?.Value; + set => this.Set((int)IniFileTupleFields.Component_, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/IniLocatorTuple.cs b/src/WixToolset.Data/Tuples/IniLocatorTuple.cs new file mode 100644 index 00000000..f956ee5f --- /dev/null +++ b/src/WixToolset.Data/Tuples/IniLocatorTuple.cs @@ -0,0 +1,84 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition IniLocator = new IntermediateTupleDefinition( + TupleDefinitionType.IniLocator, + new[] + { + new IntermediateFieldDefinition(nameof(IniLocatorTupleFields.Signature_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(IniLocatorTupleFields.FileName), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(IniLocatorTupleFields.Section), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(IniLocatorTupleFields.Key), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(IniLocatorTupleFields.Field), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(IniLocatorTupleFields.Type), IntermediateFieldType.Number), + }, + typeof(IniLocatorTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum IniLocatorTupleFields + { + Signature_, + FileName, + Section, + Key, + Field, + Type, + } + + public class IniLocatorTuple : IntermediateTuple + { + public IniLocatorTuple() : base(TupleDefinitions.IniLocator, null, null) + { + } + + public IniLocatorTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.IniLocator, sourceLineNumber, id) + { + } + + public IntermediateField this[IniLocatorTupleFields index] => this.Fields[(int)index]; + + public string Signature_ + { + get => (string)this.Fields[(int)IniLocatorTupleFields.Signature_]?.Value; + set => this.Set((int)IniLocatorTupleFields.Signature_, value); + } + + public string FileName + { + get => (string)this.Fields[(int)IniLocatorTupleFields.FileName]?.Value; + set => this.Set((int)IniLocatorTupleFields.FileName, value); + } + + public string Section + { + get => (string)this.Fields[(int)IniLocatorTupleFields.Section]?.Value; + set => this.Set((int)IniLocatorTupleFields.Section, value); + } + + public string Key + { + get => (string)this.Fields[(int)IniLocatorTupleFields.Key]?.Value; + set => this.Set((int)IniLocatorTupleFields.Key, value); + } + + public int Field + { + get => (int)this.Fields[(int)IniLocatorTupleFields.Field]?.Value; + set => this.Set((int)IniLocatorTupleFields.Field, value); + } + + public int Type + { + get => (int)this.Fields[(int)IniLocatorTupleFields.Type]?.Value; + set => this.Set((int)IniLocatorTupleFields.Type, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/InstallExecuteSequenceTuple.cs b/src/WixToolset.Data/Tuples/InstallExecuteSequenceTuple.cs new file mode 100644 index 00000000..390faf9d --- /dev/null +++ b/src/WixToolset.Data/Tuples/InstallExecuteSequenceTuple.cs @@ -0,0 +1,60 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition InstallExecuteSequence = new IntermediateTupleDefinition( + TupleDefinitionType.InstallExecuteSequence, + new[] + { + new IntermediateFieldDefinition(nameof(InstallExecuteSequenceTupleFields.Action), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(InstallExecuteSequenceTupleFields.Condition), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(InstallExecuteSequenceTupleFields.Sequence), IntermediateFieldType.Number), + }, + typeof(InstallExecuteSequenceTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum InstallExecuteSequenceTupleFields + { + Action, + Condition, + Sequence, + } + + public class InstallExecuteSequenceTuple : IntermediateTuple + { + public InstallExecuteSequenceTuple() : base(TupleDefinitions.InstallExecuteSequence, null, null) + { + } + + public InstallExecuteSequenceTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.InstallExecuteSequence, sourceLineNumber, id) + { + } + + public IntermediateField this[InstallExecuteSequenceTupleFields index] => this.Fields[(int)index]; + + public string Action + { + get => (string)this.Fields[(int)InstallExecuteSequenceTupleFields.Action]?.Value; + set => this.Set((int)InstallExecuteSequenceTupleFields.Action, value); + } + + public string Condition + { + get => (string)this.Fields[(int)InstallExecuteSequenceTupleFields.Condition]?.Value; + set => this.Set((int)InstallExecuteSequenceTupleFields.Condition, value); + } + + public int Sequence + { + get => (int)this.Fields[(int)InstallExecuteSequenceTupleFields.Sequence]?.Value; + set => this.Set((int)InstallExecuteSequenceTupleFields.Sequence, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/InstallUISequenceTuple.cs b/src/WixToolset.Data/Tuples/InstallUISequenceTuple.cs new file mode 100644 index 00000000..07409c37 --- /dev/null +++ b/src/WixToolset.Data/Tuples/InstallUISequenceTuple.cs @@ -0,0 +1,60 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition InstallUISequence = new IntermediateTupleDefinition( + TupleDefinitionType.InstallUISequence, + new[] + { + new IntermediateFieldDefinition(nameof(InstallUISequenceTupleFields.Action), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(InstallUISequenceTupleFields.Condition), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(InstallUISequenceTupleFields.Sequence), IntermediateFieldType.Number), + }, + typeof(InstallUISequenceTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum InstallUISequenceTupleFields + { + Action, + Condition, + Sequence, + } + + public class InstallUISequenceTuple : IntermediateTuple + { + public InstallUISequenceTuple() : base(TupleDefinitions.InstallUISequence, null, null) + { + } + + public InstallUISequenceTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.InstallUISequence, sourceLineNumber, id) + { + } + + public IntermediateField this[InstallUISequenceTupleFields index] => this.Fields[(int)index]; + + public string Action + { + get => (string)this.Fields[(int)InstallUISequenceTupleFields.Action]?.Value; + set => this.Set((int)InstallUISequenceTupleFields.Action, value); + } + + public string Condition + { + get => (string)this.Fields[(int)InstallUISequenceTupleFields.Condition]?.Value; + set => this.Set((int)InstallUISequenceTupleFields.Condition, value); + } + + public int Sequence + { + get => (int)this.Fields[(int)InstallUISequenceTupleFields.Sequence]?.Value; + set => this.Set((int)InstallUISequenceTupleFields.Sequence, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/IsolatedComponentTuple.cs b/src/WixToolset.Data/Tuples/IsolatedComponentTuple.cs new file mode 100644 index 00000000..5fb4f8aa --- /dev/null +++ b/src/WixToolset.Data/Tuples/IsolatedComponentTuple.cs @@ -0,0 +1,52 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition IsolatedComponent = new IntermediateTupleDefinition( + TupleDefinitionType.IsolatedComponent, + new[] + { + new IntermediateFieldDefinition(nameof(IsolatedComponentTupleFields.Component_Shared), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(IsolatedComponentTupleFields.Component_Application), IntermediateFieldType.String), + }, + typeof(IsolatedComponentTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum IsolatedComponentTupleFields + { + Component_Shared, + Component_Application, + } + + public class IsolatedComponentTuple : IntermediateTuple + { + public IsolatedComponentTuple() : base(TupleDefinitions.IsolatedComponent, null, null) + { + } + + public IsolatedComponentTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.IsolatedComponent, sourceLineNumber, id) + { + } + + public IntermediateField this[IsolatedComponentTupleFields index] => this.Fields[(int)index]; + + public string Component_Shared + { + get => (string)this.Fields[(int)IsolatedComponentTupleFields.Component_Shared]?.Value; + set => this.Set((int)IsolatedComponentTupleFields.Component_Shared, value); + } + + public string Component_Application + { + get => (string)this.Fields[(int)IsolatedComponentTupleFields.Component_Application]?.Value; + set => this.Set((int)IsolatedComponentTupleFields.Component_Application, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/LaunchConditionTuple.cs b/src/WixToolset.Data/Tuples/LaunchConditionTuple.cs new file mode 100644 index 00000000..f5718607 --- /dev/null +++ b/src/WixToolset.Data/Tuples/LaunchConditionTuple.cs @@ -0,0 +1,52 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition LaunchCondition = new IntermediateTupleDefinition( + TupleDefinitionType.LaunchCondition, + new[] + { + new IntermediateFieldDefinition(nameof(LaunchConditionTupleFields.Condition), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(LaunchConditionTupleFields.Description), IntermediateFieldType.String), + }, + typeof(LaunchConditionTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum LaunchConditionTupleFields + { + Condition, + Description, + } + + public class LaunchConditionTuple : IntermediateTuple + { + public LaunchConditionTuple() : base(TupleDefinitions.LaunchCondition, null, null) + { + } + + public LaunchConditionTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.LaunchCondition, sourceLineNumber, id) + { + } + + public IntermediateField this[LaunchConditionTupleFields index] => this.Fields[(int)index]; + + public string Condition + { + get => (string)this.Fields[(int)LaunchConditionTupleFields.Condition]?.Value; + set => this.Set((int)LaunchConditionTupleFields.Condition, value); + } + + public string Description + { + get => (string)this.Fields[(int)LaunchConditionTupleFields.Description]?.Value; + set => this.Set((int)LaunchConditionTupleFields.Description, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/ListBoxTuple.cs b/src/WixToolset.Data/Tuples/ListBoxTuple.cs new file mode 100644 index 00000000..71702c07 --- /dev/null +++ b/src/WixToolset.Data/Tuples/ListBoxTuple.cs @@ -0,0 +1,68 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition ListBox = new IntermediateTupleDefinition( + TupleDefinitionType.ListBox, + new[] + { + new IntermediateFieldDefinition(nameof(ListBoxTupleFields.Property), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ListBoxTupleFields.Order), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(ListBoxTupleFields.Value), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ListBoxTupleFields.Text), IntermediateFieldType.String), + }, + typeof(ListBoxTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum ListBoxTupleFields + { + Property, + Order, + Value, + Text, + } + + public class ListBoxTuple : IntermediateTuple + { + public ListBoxTuple() : base(TupleDefinitions.ListBox, null, null) + { + } + + public ListBoxTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.ListBox, sourceLineNumber, id) + { + } + + public IntermediateField this[ListBoxTupleFields index] => this.Fields[(int)index]; + + public string Property + { + get => (string)this.Fields[(int)ListBoxTupleFields.Property]?.Value; + set => this.Set((int)ListBoxTupleFields.Property, value); + } + + public int Order + { + get => (int)this.Fields[(int)ListBoxTupleFields.Order]?.Value; + set => this.Set((int)ListBoxTupleFields.Order, value); + } + + public string Value + { + get => (string)this.Fields[(int)ListBoxTupleFields.Value]?.Value; + set => this.Set((int)ListBoxTupleFields.Value, value); + } + + public string Text + { + get => (string)this.Fields[(int)ListBoxTupleFields.Text]?.Value; + set => this.Set((int)ListBoxTupleFields.Text, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/ListViewTuple.cs b/src/WixToolset.Data/Tuples/ListViewTuple.cs new file mode 100644 index 00000000..3b1f4c88 --- /dev/null +++ b/src/WixToolset.Data/Tuples/ListViewTuple.cs @@ -0,0 +1,76 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition ListView = new IntermediateTupleDefinition( + TupleDefinitionType.ListView, + new[] + { + new IntermediateFieldDefinition(nameof(ListViewTupleFields.Property), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ListViewTupleFields.Order), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(ListViewTupleFields.Value), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ListViewTupleFields.Text), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ListViewTupleFields.Binary_), IntermediateFieldType.String), + }, + typeof(ListViewTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum ListViewTupleFields + { + Property, + Order, + Value, + Text, + Binary_, + } + + public class ListViewTuple : IntermediateTuple + { + public ListViewTuple() : base(TupleDefinitions.ListView, null, null) + { + } + + public ListViewTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.ListView, sourceLineNumber, id) + { + } + + public IntermediateField this[ListViewTupleFields index] => this.Fields[(int)index]; + + public string Property + { + get => (string)this.Fields[(int)ListViewTupleFields.Property]?.Value; + set => this.Set((int)ListViewTupleFields.Property, value); + } + + public int Order + { + get => (int)this.Fields[(int)ListViewTupleFields.Order]?.Value; + set => this.Set((int)ListViewTupleFields.Order, value); + } + + public string Value + { + get => (string)this.Fields[(int)ListViewTupleFields.Value]?.Value; + set => this.Set((int)ListViewTupleFields.Value, value); + } + + public string Text + { + get => (string)this.Fields[(int)ListViewTupleFields.Text]?.Value; + set => this.Set((int)ListViewTupleFields.Text, value); + } + + public string Binary_ + { + get => (string)this.Fields[(int)ListViewTupleFields.Binary_]?.Value; + set => this.Set((int)ListViewTupleFields.Binary_, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/LockPermissionsTuple.cs b/src/WixToolset.Data/Tuples/LockPermissionsTuple.cs new file mode 100644 index 00000000..cff4aaa0 --- /dev/null +++ b/src/WixToolset.Data/Tuples/LockPermissionsTuple.cs @@ -0,0 +1,76 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition LockPermissions = new IntermediateTupleDefinition( + TupleDefinitionType.LockPermissions, + new[] + { + new IntermediateFieldDefinition(nameof(LockPermissionsTupleFields.LockObject), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(LockPermissionsTupleFields.Table), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(LockPermissionsTupleFields.Domain), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(LockPermissionsTupleFields.User), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(LockPermissionsTupleFields.Permission), IntermediateFieldType.Number), + }, + typeof(LockPermissionsTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum LockPermissionsTupleFields + { + LockObject, + Table, + Domain, + User, + Permission, + } + + public class LockPermissionsTuple : IntermediateTuple + { + public LockPermissionsTuple() : base(TupleDefinitions.LockPermissions, null, null) + { + } + + public LockPermissionsTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.LockPermissions, sourceLineNumber, id) + { + } + + public IntermediateField this[LockPermissionsTupleFields index] => this.Fields[(int)index]; + + public string LockObject + { + get => (string)this.Fields[(int)LockPermissionsTupleFields.LockObject]?.Value; + set => this.Set((int)LockPermissionsTupleFields.LockObject, value); + } + + public string Table + { + get => (string)this.Fields[(int)LockPermissionsTupleFields.Table]?.Value; + set => this.Set((int)LockPermissionsTupleFields.Table, value); + } + + public string Domain + { + get => (string)this.Fields[(int)LockPermissionsTupleFields.Domain]?.Value; + set => this.Set((int)LockPermissionsTupleFields.Domain, value); + } + + public string User + { + get => (string)this.Fields[(int)LockPermissionsTupleFields.User]?.Value; + set => this.Set((int)LockPermissionsTupleFields.User, value); + } + + public int Permission + { + get => (int)this.Fields[(int)LockPermissionsTupleFields.Permission]?.Value; + set => this.Set((int)LockPermissionsTupleFields.Permission, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/MIMETuple.cs b/src/WixToolset.Data/Tuples/MIMETuple.cs new file mode 100644 index 00000000..8453275e --- /dev/null +++ b/src/WixToolset.Data/Tuples/MIMETuple.cs @@ -0,0 +1,60 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition MIME = new IntermediateTupleDefinition( + TupleDefinitionType.MIME, + new[] + { + new IntermediateFieldDefinition(nameof(MIMETupleFields.ContentType), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(MIMETupleFields.Extension_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(MIMETupleFields.CLSID), IntermediateFieldType.String), + }, + typeof(MIMETuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum MIMETupleFields + { + ContentType, + Extension_, + CLSID, + } + + public class MIMETuple : IntermediateTuple + { + public MIMETuple() : base(TupleDefinitions.MIME, null, null) + { + } + + public MIMETuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.MIME, sourceLineNumber, id) + { + } + + public IntermediateField this[MIMETupleFields index] => this.Fields[(int)index]; + + public string ContentType + { + get => (string)this.Fields[(int)MIMETupleFields.ContentType]?.Value; + set => this.Set((int)MIMETupleFields.ContentType, value); + } + + public string Extension_ + { + get => (string)this.Fields[(int)MIMETupleFields.Extension_]?.Value; + set => this.Set((int)MIMETupleFields.Extension_, value); + } + + public string CLSID + { + get => (string)this.Fields[(int)MIMETupleFields.CLSID]?.Value; + set => this.Set((int)MIMETupleFields.CLSID, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/MediaTuple.cs b/src/WixToolset.Data/Tuples/MediaTuple.cs new file mode 100644 index 00000000..305080c3 --- /dev/null +++ b/src/WixToolset.Data/Tuples/MediaTuple.cs @@ -0,0 +1,84 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition Media = new IntermediateTupleDefinition( + TupleDefinitionType.Media, + new[] + { + new IntermediateFieldDefinition(nameof(MediaTupleFields.DiskId), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(MediaTupleFields.LastSequence), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(MediaTupleFields.DiskPrompt), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(MediaTupleFields.Cabinet), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(MediaTupleFields.VolumeLabel), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(MediaTupleFields.Source), IntermediateFieldType.String), + }, + typeof(MediaTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum MediaTupleFields + { + DiskId, + LastSequence, + DiskPrompt, + Cabinet, + VolumeLabel, + Source, + } + + public class MediaTuple : IntermediateTuple + { + public MediaTuple() : base(TupleDefinitions.Media, null, null) + { + } + + public MediaTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.Media, sourceLineNumber, id) + { + } + + public IntermediateField this[MediaTupleFields index] => this.Fields[(int)index]; + + public int DiskId + { + get => (int)this.Fields[(int)MediaTupleFields.DiskId]?.Value; + set => this.Set((int)MediaTupleFields.DiskId, value); + } + + public int LastSequence + { + get => (int)this.Fields[(int)MediaTupleFields.LastSequence]?.Value; + set => this.Set((int)MediaTupleFields.LastSequence, value); + } + + public string DiskPrompt + { + get => (string)this.Fields[(int)MediaTupleFields.DiskPrompt]?.Value; + set => this.Set((int)MediaTupleFields.DiskPrompt, value); + } + + public string Cabinet + { + get => (string)this.Fields[(int)MediaTupleFields.Cabinet]?.Value; + set => this.Set((int)MediaTupleFields.Cabinet, value); + } + + public string VolumeLabel + { + get => (string)this.Fields[(int)MediaTupleFields.VolumeLabel]?.Value; + set => this.Set((int)MediaTupleFields.VolumeLabel, value); + } + + public string Source + { + get => (string)this.Fields[(int)MediaTupleFields.Source]?.Value; + set => this.Set((int)MediaTupleFields.Source, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/ModuleAdminExecuteSequenceTuple.cs b/src/WixToolset.Data/Tuples/ModuleAdminExecuteSequenceTuple.cs new file mode 100644 index 00000000..4f762214 --- /dev/null +++ b/src/WixToolset.Data/Tuples/ModuleAdminExecuteSequenceTuple.cs @@ -0,0 +1,76 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition ModuleAdminExecuteSequence = new IntermediateTupleDefinition( + TupleDefinitionType.ModuleAdminExecuteSequence, + new[] + { + new IntermediateFieldDefinition(nameof(ModuleAdminExecuteSequenceTupleFields.Action), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ModuleAdminExecuteSequenceTupleFields.Sequence), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(ModuleAdminExecuteSequenceTupleFields.BaseAction), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ModuleAdminExecuteSequenceTupleFields.After), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(ModuleAdminExecuteSequenceTupleFields.Condition), IntermediateFieldType.String), + }, + typeof(ModuleAdminExecuteSequenceTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum ModuleAdminExecuteSequenceTupleFields + { + Action, + Sequence, + BaseAction, + After, + Condition, + } + + public class ModuleAdminExecuteSequenceTuple : IntermediateTuple + { + public ModuleAdminExecuteSequenceTuple() : base(TupleDefinitions.ModuleAdminExecuteSequence, null, null) + { + } + + public ModuleAdminExecuteSequenceTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.ModuleAdminExecuteSequence, sourceLineNumber, id) + { + } + + public IntermediateField this[ModuleAdminExecuteSequenceTupleFields index] => this.Fields[(int)index]; + + public string Action + { + get => (string)this.Fields[(int)ModuleAdminExecuteSequenceTupleFields.Action]?.Value; + set => this.Set((int)ModuleAdminExecuteSequenceTupleFields.Action, value); + } + + public int Sequence + { + get => (int)this.Fields[(int)ModuleAdminExecuteSequenceTupleFields.Sequence]?.Value; + set => this.Set((int)ModuleAdminExecuteSequenceTupleFields.Sequence, value); + } + + public string BaseAction + { + get => (string)this.Fields[(int)ModuleAdminExecuteSequenceTupleFields.BaseAction]?.Value; + set => this.Set((int)ModuleAdminExecuteSequenceTupleFields.BaseAction, value); + } + + public int After + { + get => (int)this.Fields[(int)ModuleAdminExecuteSequenceTupleFields.After]?.Value; + set => this.Set((int)ModuleAdminExecuteSequenceTupleFields.After, value); + } + + public string Condition + { + get => (string)this.Fields[(int)ModuleAdminExecuteSequenceTupleFields.Condition]?.Value; + set => this.Set((int)ModuleAdminExecuteSequenceTupleFields.Condition, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/ModuleAdminUISequenceTuple.cs b/src/WixToolset.Data/Tuples/ModuleAdminUISequenceTuple.cs new file mode 100644 index 00000000..bc873b72 --- /dev/null +++ b/src/WixToolset.Data/Tuples/ModuleAdminUISequenceTuple.cs @@ -0,0 +1,76 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition ModuleAdminUISequence = new IntermediateTupleDefinition( + TupleDefinitionType.ModuleAdminUISequence, + new[] + { + new IntermediateFieldDefinition(nameof(ModuleAdminUISequenceTupleFields.Action), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ModuleAdminUISequenceTupleFields.Sequence), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(ModuleAdminUISequenceTupleFields.BaseAction), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ModuleAdminUISequenceTupleFields.After), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(ModuleAdminUISequenceTupleFields.Condition), IntermediateFieldType.String), + }, + typeof(ModuleAdminUISequenceTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum ModuleAdminUISequenceTupleFields + { + Action, + Sequence, + BaseAction, + After, + Condition, + } + + public class ModuleAdminUISequenceTuple : IntermediateTuple + { + public ModuleAdminUISequenceTuple() : base(TupleDefinitions.ModuleAdminUISequence, null, null) + { + } + + public ModuleAdminUISequenceTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.ModuleAdminUISequence, sourceLineNumber, id) + { + } + + public IntermediateField this[ModuleAdminUISequenceTupleFields index] => this.Fields[(int)index]; + + public string Action + { + get => (string)this.Fields[(int)ModuleAdminUISequenceTupleFields.Action]?.Value; + set => this.Set((int)ModuleAdminUISequenceTupleFields.Action, value); + } + + public int Sequence + { + get => (int)this.Fields[(int)ModuleAdminUISequenceTupleFields.Sequence]?.Value; + set => this.Set((int)ModuleAdminUISequenceTupleFields.Sequence, value); + } + + public string BaseAction + { + get => (string)this.Fields[(int)ModuleAdminUISequenceTupleFields.BaseAction]?.Value; + set => this.Set((int)ModuleAdminUISequenceTupleFields.BaseAction, value); + } + + public int After + { + get => (int)this.Fields[(int)ModuleAdminUISequenceTupleFields.After]?.Value; + set => this.Set((int)ModuleAdminUISequenceTupleFields.After, value); + } + + public string Condition + { + get => (string)this.Fields[(int)ModuleAdminUISequenceTupleFields.Condition]?.Value; + set => this.Set((int)ModuleAdminUISequenceTupleFields.Condition, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/ModuleAdvtExecuteSequenceTuple.cs b/src/WixToolset.Data/Tuples/ModuleAdvtExecuteSequenceTuple.cs new file mode 100644 index 00000000..2864be7e --- /dev/null +++ b/src/WixToolset.Data/Tuples/ModuleAdvtExecuteSequenceTuple.cs @@ -0,0 +1,76 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition ModuleAdvtExecuteSequence = new IntermediateTupleDefinition( + TupleDefinitionType.ModuleAdvtExecuteSequence, + new[] + { + new IntermediateFieldDefinition(nameof(ModuleAdvtExecuteSequenceTupleFields.Action), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ModuleAdvtExecuteSequenceTupleFields.Sequence), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(ModuleAdvtExecuteSequenceTupleFields.BaseAction), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ModuleAdvtExecuteSequenceTupleFields.After), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(ModuleAdvtExecuteSequenceTupleFields.Condition), IntermediateFieldType.String), + }, + typeof(ModuleAdvtExecuteSequenceTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum ModuleAdvtExecuteSequenceTupleFields + { + Action, + Sequence, + BaseAction, + After, + Condition, + } + + public class ModuleAdvtExecuteSequenceTuple : IntermediateTuple + { + public ModuleAdvtExecuteSequenceTuple() : base(TupleDefinitions.ModuleAdvtExecuteSequence, null, null) + { + } + + public ModuleAdvtExecuteSequenceTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.ModuleAdvtExecuteSequence, sourceLineNumber, id) + { + } + + public IntermediateField this[ModuleAdvtExecuteSequenceTupleFields index] => this.Fields[(int)index]; + + public string Action + { + get => (string)this.Fields[(int)ModuleAdvtExecuteSequenceTupleFields.Action]?.Value; + set => this.Set((int)ModuleAdvtExecuteSequenceTupleFields.Action, value); + } + + public int Sequence + { + get => (int)this.Fields[(int)ModuleAdvtExecuteSequenceTupleFields.Sequence]?.Value; + set => this.Set((int)ModuleAdvtExecuteSequenceTupleFields.Sequence, value); + } + + public string BaseAction + { + get => (string)this.Fields[(int)ModuleAdvtExecuteSequenceTupleFields.BaseAction]?.Value; + set => this.Set((int)ModuleAdvtExecuteSequenceTupleFields.BaseAction, value); + } + + public int After + { + get => (int)this.Fields[(int)ModuleAdvtExecuteSequenceTupleFields.After]?.Value; + set => this.Set((int)ModuleAdvtExecuteSequenceTupleFields.After, value); + } + + public string Condition + { + get => (string)this.Fields[(int)ModuleAdvtExecuteSequenceTupleFields.Condition]?.Value; + set => this.Set((int)ModuleAdvtExecuteSequenceTupleFields.Condition, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/ModuleComponentsTuple.cs b/src/WixToolset.Data/Tuples/ModuleComponentsTuple.cs new file mode 100644 index 00000000..24b9aab4 --- /dev/null +++ b/src/WixToolset.Data/Tuples/ModuleComponentsTuple.cs @@ -0,0 +1,60 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition ModuleComponents = new IntermediateTupleDefinition( + TupleDefinitionType.ModuleComponents, + new[] + { + new IntermediateFieldDefinition(nameof(ModuleComponentsTupleFields.Component), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ModuleComponentsTupleFields.ModuleID), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ModuleComponentsTupleFields.Language), IntermediateFieldType.Number), + }, + typeof(ModuleComponentsTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum ModuleComponentsTupleFields + { + Component, + ModuleID, + Language, + } + + public class ModuleComponentsTuple : IntermediateTuple + { + public ModuleComponentsTuple() : base(TupleDefinitions.ModuleComponents, null, null) + { + } + + public ModuleComponentsTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.ModuleComponents, sourceLineNumber, id) + { + } + + public IntermediateField this[ModuleComponentsTupleFields index] => this.Fields[(int)index]; + + public string Component + { + get => (string)this.Fields[(int)ModuleComponentsTupleFields.Component]?.Value; + set => this.Set((int)ModuleComponentsTupleFields.Component, value); + } + + public string ModuleID + { + get => (string)this.Fields[(int)ModuleComponentsTupleFields.ModuleID]?.Value; + set => this.Set((int)ModuleComponentsTupleFields.ModuleID, value); + } + + public int Language + { + get => (int)this.Fields[(int)ModuleComponentsTupleFields.Language]?.Value; + set => this.Set((int)ModuleComponentsTupleFields.Language, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/ModuleConfigurationTuple.cs b/src/WixToolset.Data/Tuples/ModuleConfigurationTuple.cs new file mode 100644 index 00000000..b3c4cd7f --- /dev/null +++ b/src/WixToolset.Data/Tuples/ModuleConfigurationTuple.cs @@ -0,0 +1,116 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition ModuleConfiguration = new IntermediateTupleDefinition( + TupleDefinitionType.ModuleConfiguration, + new[] + { + new IntermediateFieldDefinition(nameof(ModuleConfigurationTupleFields.Name), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ModuleConfigurationTupleFields.Format), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(ModuleConfigurationTupleFields.Type), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ModuleConfigurationTupleFields.ContextData), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ModuleConfigurationTupleFields.DefaultValue), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ModuleConfigurationTupleFields.Attributes), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(ModuleConfigurationTupleFields.DisplayName), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ModuleConfigurationTupleFields.Description), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ModuleConfigurationTupleFields.HelpLocation), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ModuleConfigurationTupleFields.HelpKeyword), IntermediateFieldType.String), + }, + typeof(ModuleConfigurationTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum ModuleConfigurationTupleFields + { + Name, + Format, + Type, + ContextData, + DefaultValue, + Attributes, + DisplayName, + Description, + HelpLocation, + HelpKeyword, + } + + public class ModuleConfigurationTuple : IntermediateTuple + { + public ModuleConfigurationTuple() : base(TupleDefinitions.ModuleConfiguration, null, null) + { + } + + public ModuleConfigurationTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.ModuleConfiguration, sourceLineNumber, id) + { + } + + public IntermediateField this[ModuleConfigurationTupleFields index] => this.Fields[(int)index]; + + public string Name + { + get => (string)this.Fields[(int)ModuleConfigurationTupleFields.Name]?.Value; + set => this.Set((int)ModuleConfigurationTupleFields.Name, value); + } + + public int Format + { + get => (int)this.Fields[(int)ModuleConfigurationTupleFields.Format]?.Value; + set => this.Set((int)ModuleConfigurationTupleFields.Format, value); + } + + public string Type + { + get => (string)this.Fields[(int)ModuleConfigurationTupleFields.Type]?.Value; + set => this.Set((int)ModuleConfigurationTupleFields.Type, value); + } + + public string ContextData + { + get => (string)this.Fields[(int)ModuleConfigurationTupleFields.ContextData]?.Value; + set => this.Set((int)ModuleConfigurationTupleFields.ContextData, value); + } + + public string DefaultValue + { + get => (string)this.Fields[(int)ModuleConfigurationTupleFields.DefaultValue]?.Value; + set => this.Set((int)ModuleConfigurationTupleFields.DefaultValue, value); + } + + public int Attributes + { + get => (int)this.Fields[(int)ModuleConfigurationTupleFields.Attributes]?.Value; + set => this.Set((int)ModuleConfigurationTupleFields.Attributes, value); + } + + public string DisplayName + { + get => (string)this.Fields[(int)ModuleConfigurationTupleFields.DisplayName]?.Value; + set => this.Set((int)ModuleConfigurationTupleFields.DisplayName, value); + } + + public string Description + { + get => (string)this.Fields[(int)ModuleConfigurationTupleFields.Description]?.Value; + set => this.Set((int)ModuleConfigurationTupleFields.Description, value); + } + + public string HelpLocation + { + get => (string)this.Fields[(int)ModuleConfigurationTupleFields.HelpLocation]?.Value; + set => this.Set((int)ModuleConfigurationTupleFields.HelpLocation, value); + } + + public string HelpKeyword + { + get => (string)this.Fields[(int)ModuleConfigurationTupleFields.HelpKeyword]?.Value; + set => this.Set((int)ModuleConfigurationTupleFields.HelpKeyword, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/ModuleDependencyTuple.cs b/src/WixToolset.Data/Tuples/ModuleDependencyTuple.cs new file mode 100644 index 00000000..ed887207 --- /dev/null +++ b/src/WixToolset.Data/Tuples/ModuleDependencyTuple.cs @@ -0,0 +1,76 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition ModuleDependency = new IntermediateTupleDefinition( + TupleDefinitionType.ModuleDependency, + new[] + { + new IntermediateFieldDefinition(nameof(ModuleDependencyTupleFields.ModuleID), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ModuleDependencyTupleFields.ModuleLanguage), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(ModuleDependencyTupleFields.RequiredID), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ModuleDependencyTupleFields.RequiredLanguage), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(ModuleDependencyTupleFields.RequiredVersion), IntermediateFieldType.String), + }, + typeof(ModuleDependencyTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum ModuleDependencyTupleFields + { + ModuleID, + ModuleLanguage, + RequiredID, + RequiredLanguage, + RequiredVersion, + } + + public class ModuleDependencyTuple : IntermediateTuple + { + public ModuleDependencyTuple() : base(TupleDefinitions.ModuleDependency, null, null) + { + } + + public ModuleDependencyTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.ModuleDependency, sourceLineNumber, id) + { + } + + public IntermediateField this[ModuleDependencyTupleFields index] => this.Fields[(int)index]; + + public string ModuleID + { + get => (string)this.Fields[(int)ModuleDependencyTupleFields.ModuleID]?.Value; + set => this.Set((int)ModuleDependencyTupleFields.ModuleID, value); + } + + public int ModuleLanguage + { + get => (int)this.Fields[(int)ModuleDependencyTupleFields.ModuleLanguage]?.Value; + set => this.Set((int)ModuleDependencyTupleFields.ModuleLanguage, value); + } + + public string RequiredID + { + get => (string)this.Fields[(int)ModuleDependencyTupleFields.RequiredID]?.Value; + set => this.Set((int)ModuleDependencyTupleFields.RequiredID, value); + } + + public int RequiredLanguage + { + get => (int)this.Fields[(int)ModuleDependencyTupleFields.RequiredLanguage]?.Value; + set => this.Set((int)ModuleDependencyTupleFields.RequiredLanguage, value); + } + + public string RequiredVersion + { + get => (string)this.Fields[(int)ModuleDependencyTupleFields.RequiredVersion]?.Value; + set => this.Set((int)ModuleDependencyTupleFields.RequiredVersion, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/ModuleExclusionTuple.cs b/src/WixToolset.Data/Tuples/ModuleExclusionTuple.cs new file mode 100644 index 00000000..968fc2cd --- /dev/null +++ b/src/WixToolset.Data/Tuples/ModuleExclusionTuple.cs @@ -0,0 +1,84 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition ModuleExclusion = new IntermediateTupleDefinition( + TupleDefinitionType.ModuleExclusion, + new[] + { + new IntermediateFieldDefinition(nameof(ModuleExclusionTupleFields.ModuleID), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ModuleExclusionTupleFields.ModuleLanguage), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(ModuleExclusionTupleFields.ExcludedID), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ModuleExclusionTupleFields.ExcludedLanguage), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(ModuleExclusionTupleFields.ExcludedMinVersion), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ModuleExclusionTupleFields.ExcludedMaxVersion), IntermediateFieldType.String), + }, + typeof(ModuleExclusionTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum ModuleExclusionTupleFields + { + ModuleID, + ModuleLanguage, + ExcludedID, + ExcludedLanguage, + ExcludedMinVersion, + ExcludedMaxVersion, + } + + public class ModuleExclusionTuple : IntermediateTuple + { + public ModuleExclusionTuple() : base(TupleDefinitions.ModuleExclusion, null, null) + { + } + + public ModuleExclusionTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.ModuleExclusion, sourceLineNumber, id) + { + } + + public IntermediateField this[ModuleExclusionTupleFields index] => this.Fields[(int)index]; + + public string ModuleID + { + get => (string)this.Fields[(int)ModuleExclusionTupleFields.ModuleID]?.Value; + set => this.Set((int)ModuleExclusionTupleFields.ModuleID, value); + } + + public int ModuleLanguage + { + get => (int)this.Fields[(int)ModuleExclusionTupleFields.ModuleLanguage]?.Value; + set => this.Set((int)ModuleExclusionTupleFields.ModuleLanguage, value); + } + + public string ExcludedID + { + get => (string)this.Fields[(int)ModuleExclusionTupleFields.ExcludedID]?.Value; + set => this.Set((int)ModuleExclusionTupleFields.ExcludedID, value); + } + + public int ExcludedLanguage + { + get => (int)this.Fields[(int)ModuleExclusionTupleFields.ExcludedLanguage]?.Value; + set => this.Set((int)ModuleExclusionTupleFields.ExcludedLanguage, value); + } + + public string ExcludedMinVersion + { + get => (string)this.Fields[(int)ModuleExclusionTupleFields.ExcludedMinVersion]?.Value; + set => this.Set((int)ModuleExclusionTupleFields.ExcludedMinVersion, value); + } + + public string ExcludedMaxVersion + { + get => (string)this.Fields[(int)ModuleExclusionTupleFields.ExcludedMaxVersion]?.Value; + set => this.Set((int)ModuleExclusionTupleFields.ExcludedMaxVersion, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/ModuleIgnoreTableTuple.cs b/src/WixToolset.Data/Tuples/ModuleIgnoreTableTuple.cs new file mode 100644 index 00000000..ec82c94b --- /dev/null +++ b/src/WixToolset.Data/Tuples/ModuleIgnoreTableTuple.cs @@ -0,0 +1,44 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition ModuleIgnoreTable = new IntermediateTupleDefinition( + TupleDefinitionType.ModuleIgnoreTable, + new[] + { + new IntermediateFieldDefinition(nameof(ModuleIgnoreTableTupleFields.Table), IntermediateFieldType.String), + }, + typeof(ModuleIgnoreTableTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum ModuleIgnoreTableTupleFields + { + Table, + } + + public class ModuleIgnoreTableTuple : IntermediateTuple + { + public ModuleIgnoreTableTuple() : base(TupleDefinitions.ModuleIgnoreTable, null, null) + { + } + + public ModuleIgnoreTableTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.ModuleIgnoreTable, sourceLineNumber, id) + { + } + + public IntermediateField this[ModuleIgnoreTableTupleFields index] => this.Fields[(int)index]; + + public string Table + { + get => (string)this.Fields[(int)ModuleIgnoreTableTupleFields.Table]?.Value; + set => this.Set((int)ModuleIgnoreTableTupleFields.Table, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/ModuleInstallExecuteSequenceTuple.cs b/src/WixToolset.Data/Tuples/ModuleInstallExecuteSequenceTuple.cs new file mode 100644 index 00000000..22bb678c --- /dev/null +++ b/src/WixToolset.Data/Tuples/ModuleInstallExecuteSequenceTuple.cs @@ -0,0 +1,76 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition ModuleInstallExecuteSequence = new IntermediateTupleDefinition( + TupleDefinitionType.ModuleInstallExecuteSequence, + new[] + { + new IntermediateFieldDefinition(nameof(ModuleInstallExecuteSequenceTupleFields.Action), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ModuleInstallExecuteSequenceTupleFields.Sequence), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(ModuleInstallExecuteSequenceTupleFields.BaseAction), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ModuleInstallExecuteSequenceTupleFields.After), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(ModuleInstallExecuteSequenceTupleFields.Condition), IntermediateFieldType.String), + }, + typeof(ModuleInstallExecuteSequenceTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum ModuleInstallExecuteSequenceTupleFields + { + Action, + Sequence, + BaseAction, + After, + Condition, + } + + public class ModuleInstallExecuteSequenceTuple : IntermediateTuple + { + public ModuleInstallExecuteSequenceTuple() : base(TupleDefinitions.ModuleInstallExecuteSequence, null, null) + { + } + + public ModuleInstallExecuteSequenceTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.ModuleInstallExecuteSequence, sourceLineNumber, id) + { + } + + public IntermediateField this[ModuleInstallExecuteSequenceTupleFields index] => this.Fields[(int)index]; + + public string Action + { + get => (string)this.Fields[(int)ModuleInstallExecuteSequenceTupleFields.Action]?.Value; + set => this.Set((int)ModuleInstallExecuteSequenceTupleFields.Action, value); + } + + public int Sequence + { + get => (int)this.Fields[(int)ModuleInstallExecuteSequenceTupleFields.Sequence]?.Value; + set => this.Set((int)ModuleInstallExecuteSequenceTupleFields.Sequence, value); + } + + public string BaseAction + { + get => (string)this.Fields[(int)ModuleInstallExecuteSequenceTupleFields.BaseAction]?.Value; + set => this.Set((int)ModuleInstallExecuteSequenceTupleFields.BaseAction, value); + } + + public int After + { + get => (int)this.Fields[(int)ModuleInstallExecuteSequenceTupleFields.After]?.Value; + set => this.Set((int)ModuleInstallExecuteSequenceTupleFields.After, value); + } + + public string Condition + { + get => (string)this.Fields[(int)ModuleInstallExecuteSequenceTupleFields.Condition]?.Value; + set => this.Set((int)ModuleInstallExecuteSequenceTupleFields.Condition, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/ModuleInstallUISequenceTuple.cs b/src/WixToolset.Data/Tuples/ModuleInstallUISequenceTuple.cs new file mode 100644 index 00000000..cc6e0c76 --- /dev/null +++ b/src/WixToolset.Data/Tuples/ModuleInstallUISequenceTuple.cs @@ -0,0 +1,76 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition ModuleInstallUISequence = new IntermediateTupleDefinition( + TupleDefinitionType.ModuleInstallUISequence, + new[] + { + new IntermediateFieldDefinition(nameof(ModuleInstallUISequenceTupleFields.Action), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ModuleInstallUISequenceTupleFields.Sequence), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(ModuleInstallUISequenceTupleFields.BaseAction), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ModuleInstallUISequenceTupleFields.After), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(ModuleInstallUISequenceTupleFields.Condition), IntermediateFieldType.String), + }, + typeof(ModuleInstallUISequenceTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum ModuleInstallUISequenceTupleFields + { + Action, + Sequence, + BaseAction, + After, + Condition, + } + + public class ModuleInstallUISequenceTuple : IntermediateTuple + { + public ModuleInstallUISequenceTuple() : base(TupleDefinitions.ModuleInstallUISequence, null, null) + { + } + + public ModuleInstallUISequenceTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.ModuleInstallUISequence, sourceLineNumber, id) + { + } + + public IntermediateField this[ModuleInstallUISequenceTupleFields index] => this.Fields[(int)index]; + + public string Action + { + get => (string)this.Fields[(int)ModuleInstallUISequenceTupleFields.Action]?.Value; + set => this.Set((int)ModuleInstallUISequenceTupleFields.Action, value); + } + + public int Sequence + { + get => (int)this.Fields[(int)ModuleInstallUISequenceTupleFields.Sequence]?.Value; + set => this.Set((int)ModuleInstallUISequenceTupleFields.Sequence, value); + } + + public string BaseAction + { + get => (string)this.Fields[(int)ModuleInstallUISequenceTupleFields.BaseAction]?.Value; + set => this.Set((int)ModuleInstallUISequenceTupleFields.BaseAction, value); + } + + public int After + { + get => (int)this.Fields[(int)ModuleInstallUISequenceTupleFields.After]?.Value; + set => this.Set((int)ModuleInstallUISequenceTupleFields.After, value); + } + + public string Condition + { + get => (string)this.Fields[(int)ModuleInstallUISequenceTupleFields.Condition]?.Value; + set => this.Set((int)ModuleInstallUISequenceTupleFields.Condition, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/ModuleSignatureTuple.cs b/src/WixToolset.Data/Tuples/ModuleSignatureTuple.cs new file mode 100644 index 00000000..836f769b --- /dev/null +++ b/src/WixToolset.Data/Tuples/ModuleSignatureTuple.cs @@ -0,0 +1,60 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition ModuleSignature = new IntermediateTupleDefinition( + TupleDefinitionType.ModuleSignature, + new[] + { + new IntermediateFieldDefinition(nameof(ModuleSignatureTupleFields.ModuleID), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ModuleSignatureTupleFields.Language), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(ModuleSignatureTupleFields.Version), IntermediateFieldType.String), + }, + typeof(ModuleSignatureTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum ModuleSignatureTupleFields + { + ModuleID, + Language, + Version, + } + + public class ModuleSignatureTuple : IntermediateTuple + { + public ModuleSignatureTuple() : base(TupleDefinitions.ModuleSignature, null, null) + { + } + + public ModuleSignatureTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.ModuleSignature, sourceLineNumber, id) + { + } + + public IntermediateField this[ModuleSignatureTupleFields index] => this.Fields[(int)index]; + + public string ModuleID + { + get => (string)this.Fields[(int)ModuleSignatureTupleFields.ModuleID]?.Value; + set => this.Set((int)ModuleSignatureTupleFields.ModuleID, value); + } + + public int Language + { + get => (int)this.Fields[(int)ModuleSignatureTupleFields.Language]?.Value; + set => this.Set((int)ModuleSignatureTupleFields.Language, value); + } + + public string Version + { + get => (string)this.Fields[(int)ModuleSignatureTupleFields.Version]?.Value; + set => this.Set((int)ModuleSignatureTupleFields.Version, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/ModuleSubstitutionTuple.cs b/src/WixToolset.Data/Tuples/ModuleSubstitutionTuple.cs new file mode 100644 index 00000000..609670f0 --- /dev/null +++ b/src/WixToolset.Data/Tuples/ModuleSubstitutionTuple.cs @@ -0,0 +1,68 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition ModuleSubstitution = new IntermediateTupleDefinition( + TupleDefinitionType.ModuleSubstitution, + new[] + { + new IntermediateFieldDefinition(nameof(ModuleSubstitutionTupleFields.Table), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ModuleSubstitutionTupleFields.Row), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ModuleSubstitutionTupleFields.Column), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ModuleSubstitutionTupleFields.Value), IntermediateFieldType.String), + }, + typeof(ModuleSubstitutionTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum ModuleSubstitutionTupleFields + { + Table, + Row, + Column, + Value, + } + + public class ModuleSubstitutionTuple : IntermediateTuple + { + public ModuleSubstitutionTuple() : base(TupleDefinitions.ModuleSubstitution, null, null) + { + } + + public ModuleSubstitutionTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.ModuleSubstitution, sourceLineNumber, id) + { + } + + public IntermediateField this[ModuleSubstitutionTupleFields index] => this.Fields[(int)index]; + + public string Table + { + get => (string)this.Fields[(int)ModuleSubstitutionTupleFields.Table]?.Value; + set => this.Set((int)ModuleSubstitutionTupleFields.Table, value); + } + + public string Row + { + get => (string)this.Fields[(int)ModuleSubstitutionTupleFields.Row]?.Value; + set => this.Set((int)ModuleSubstitutionTupleFields.Row, value); + } + + public string Column + { + get => (string)this.Fields[(int)ModuleSubstitutionTupleFields.Column]?.Value; + set => this.Set((int)ModuleSubstitutionTupleFields.Column, value); + } + + public string Value + { + get => (string)this.Fields[(int)ModuleSubstitutionTupleFields.Value]?.Value; + set => this.Set((int)ModuleSubstitutionTupleFields.Value, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/MoveFileTuple.cs b/src/WixToolset.Data/Tuples/MoveFileTuple.cs new file mode 100644 index 00000000..404d39b3 --- /dev/null +++ b/src/WixToolset.Data/Tuples/MoveFileTuple.cs @@ -0,0 +1,92 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition MoveFile = new IntermediateTupleDefinition( + TupleDefinitionType.MoveFile, + new[] + { + new IntermediateFieldDefinition(nameof(MoveFileTupleFields.FileKey), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(MoveFileTupleFields.Component_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(MoveFileTupleFields.SourceName), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(MoveFileTupleFields.DestName), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(MoveFileTupleFields.SourceFolder), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(MoveFileTupleFields.DestFolder), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(MoveFileTupleFields.Options), IntermediateFieldType.Number), + }, + typeof(MoveFileTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum MoveFileTupleFields + { + FileKey, + Component_, + SourceName, + DestName, + SourceFolder, + DestFolder, + Options, + } + + public class MoveFileTuple : IntermediateTuple + { + public MoveFileTuple() : base(TupleDefinitions.MoveFile, null, null) + { + } + + public MoveFileTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.MoveFile, sourceLineNumber, id) + { + } + + public IntermediateField this[MoveFileTupleFields index] => this.Fields[(int)index]; + + public string FileKey + { + get => (string)this.Fields[(int)MoveFileTupleFields.FileKey]?.Value; + set => this.Set((int)MoveFileTupleFields.FileKey, value); + } + + public string Component_ + { + get => (string)this.Fields[(int)MoveFileTupleFields.Component_]?.Value; + set => this.Set((int)MoveFileTupleFields.Component_, value); + } + + public string SourceName + { + get => (string)this.Fields[(int)MoveFileTupleFields.SourceName]?.Value; + set => this.Set((int)MoveFileTupleFields.SourceName, value); + } + + public string DestName + { + get => (string)this.Fields[(int)MoveFileTupleFields.DestName]?.Value; + set => this.Set((int)MoveFileTupleFields.DestName, value); + } + + public string SourceFolder + { + get => (string)this.Fields[(int)MoveFileTupleFields.SourceFolder]?.Value; + set => this.Set((int)MoveFileTupleFields.SourceFolder, value); + } + + public string DestFolder + { + get => (string)this.Fields[(int)MoveFileTupleFields.DestFolder]?.Value; + set => this.Set((int)MoveFileTupleFields.DestFolder, value); + } + + public int Options + { + get => (int)this.Fields[(int)MoveFileTupleFields.Options]?.Value; + set => this.Set((int)MoveFileTupleFields.Options, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/MsiAssemblyNameTuple.cs b/src/WixToolset.Data/Tuples/MsiAssemblyNameTuple.cs new file mode 100644 index 00000000..a8e97b00 --- /dev/null +++ b/src/WixToolset.Data/Tuples/MsiAssemblyNameTuple.cs @@ -0,0 +1,60 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition MsiAssemblyName = new IntermediateTupleDefinition( + TupleDefinitionType.MsiAssemblyName, + new[] + { + new IntermediateFieldDefinition(nameof(MsiAssemblyNameTupleFields.Component_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(MsiAssemblyNameTupleFields.Name), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(MsiAssemblyNameTupleFields.Value), IntermediateFieldType.String), + }, + typeof(MsiAssemblyNameTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum MsiAssemblyNameTupleFields + { + Component_, + Name, + Value, + } + + public class MsiAssemblyNameTuple : IntermediateTuple + { + public MsiAssemblyNameTuple() : base(TupleDefinitions.MsiAssemblyName, null, null) + { + } + + public MsiAssemblyNameTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.MsiAssemblyName, sourceLineNumber, id) + { + } + + public IntermediateField this[MsiAssemblyNameTupleFields index] => this.Fields[(int)index]; + + public string Component_ + { + get => (string)this.Fields[(int)MsiAssemblyNameTupleFields.Component_]?.Value; + set => this.Set((int)MsiAssemblyNameTupleFields.Component_, value); + } + + public string Name + { + get => (string)this.Fields[(int)MsiAssemblyNameTupleFields.Name]?.Value; + set => this.Set((int)MsiAssemblyNameTupleFields.Name, value); + } + + public string Value + { + get => (string)this.Fields[(int)MsiAssemblyNameTupleFields.Value]?.Value; + set => this.Set((int)MsiAssemblyNameTupleFields.Value, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/MsiAssemblyTuple.cs b/src/WixToolset.Data/Tuples/MsiAssemblyTuple.cs new file mode 100644 index 00000000..0cd814d8 --- /dev/null +++ b/src/WixToolset.Data/Tuples/MsiAssemblyTuple.cs @@ -0,0 +1,76 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition MsiAssembly = new IntermediateTupleDefinition( + TupleDefinitionType.MsiAssembly, + new[] + { + new IntermediateFieldDefinition(nameof(MsiAssemblyTupleFields.Component_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(MsiAssemblyTupleFields.Feature_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(MsiAssemblyTupleFields.File_Manifest), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(MsiAssemblyTupleFields.File_Application), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(MsiAssemblyTupleFields.Attributes), IntermediateFieldType.Number), + }, + typeof(MsiAssemblyTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum MsiAssemblyTupleFields + { + Component_, + Feature_, + File_Manifest, + File_Application, + Attributes, + } + + public class MsiAssemblyTuple : IntermediateTuple + { + public MsiAssemblyTuple() : base(TupleDefinitions.MsiAssembly, null, null) + { + } + + public MsiAssemblyTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.MsiAssembly, sourceLineNumber, id) + { + } + + public IntermediateField this[MsiAssemblyTupleFields index] => this.Fields[(int)index]; + + public string Component_ + { + get => (string)this.Fields[(int)MsiAssemblyTupleFields.Component_]?.Value; + set => this.Set((int)MsiAssemblyTupleFields.Component_, value); + } + + public string Feature_ + { + get => (string)this.Fields[(int)MsiAssemblyTupleFields.Feature_]?.Value; + set => this.Set((int)MsiAssemblyTupleFields.Feature_, value); + } + + public string File_Manifest + { + get => (string)this.Fields[(int)MsiAssemblyTupleFields.File_Manifest]?.Value; + set => this.Set((int)MsiAssemblyTupleFields.File_Manifest, value); + } + + public string File_Application + { + get => (string)this.Fields[(int)MsiAssemblyTupleFields.File_Application]?.Value; + set => this.Set((int)MsiAssemblyTupleFields.File_Application, value); + } + + public int Attributes + { + get => (int)this.Fields[(int)MsiAssemblyTupleFields.Attributes]?.Value; + set => this.Set((int)MsiAssemblyTupleFields.Attributes, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/MsiDigitalCertificateTuple.cs b/src/WixToolset.Data/Tuples/MsiDigitalCertificateTuple.cs new file mode 100644 index 00000000..fb949afb --- /dev/null +++ b/src/WixToolset.Data/Tuples/MsiDigitalCertificateTuple.cs @@ -0,0 +1,52 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition MsiDigitalCertificate = new IntermediateTupleDefinition( + TupleDefinitionType.MsiDigitalCertificate, + new[] + { + new IntermediateFieldDefinition(nameof(MsiDigitalCertificateTupleFields.DigitalCertificate), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(MsiDigitalCertificateTupleFields.CertData), IntermediateFieldType.Path), + }, + typeof(MsiDigitalCertificateTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum MsiDigitalCertificateTupleFields + { + DigitalCertificate, + CertData, + } + + public class MsiDigitalCertificateTuple : IntermediateTuple + { + public MsiDigitalCertificateTuple() : base(TupleDefinitions.MsiDigitalCertificate, null, null) + { + } + + public MsiDigitalCertificateTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.MsiDigitalCertificate, sourceLineNumber, id) + { + } + + public IntermediateField this[MsiDigitalCertificateTupleFields index] => this.Fields[(int)index]; + + public string DigitalCertificate + { + get => (string)this.Fields[(int)MsiDigitalCertificateTupleFields.DigitalCertificate]?.Value; + set => this.Set((int)MsiDigitalCertificateTupleFields.DigitalCertificate, value); + } + + public string CertData + { + get => (string)this.Fields[(int)MsiDigitalCertificateTupleFields.CertData]?.Value; + set => this.Set((int)MsiDigitalCertificateTupleFields.CertData, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/MsiDigitalSignatureTuple.cs b/src/WixToolset.Data/Tuples/MsiDigitalSignatureTuple.cs new file mode 100644 index 00000000..8b30c53c --- /dev/null +++ b/src/WixToolset.Data/Tuples/MsiDigitalSignatureTuple.cs @@ -0,0 +1,68 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition MsiDigitalSignature = new IntermediateTupleDefinition( + TupleDefinitionType.MsiDigitalSignature, + new[] + { + new IntermediateFieldDefinition(nameof(MsiDigitalSignatureTupleFields.Table), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(MsiDigitalSignatureTupleFields.SignObject), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(MsiDigitalSignatureTupleFields.DigitalCertificate_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(MsiDigitalSignatureTupleFields.Hash), IntermediateFieldType.Path), + }, + typeof(MsiDigitalSignatureTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum MsiDigitalSignatureTupleFields + { + Table, + SignObject, + DigitalCertificate_, + Hash, + } + + public class MsiDigitalSignatureTuple : IntermediateTuple + { + public MsiDigitalSignatureTuple() : base(TupleDefinitions.MsiDigitalSignature, null, null) + { + } + + public MsiDigitalSignatureTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.MsiDigitalSignature, sourceLineNumber, id) + { + } + + public IntermediateField this[MsiDigitalSignatureTupleFields index] => this.Fields[(int)index]; + + public string Table + { + get => (string)this.Fields[(int)MsiDigitalSignatureTupleFields.Table]?.Value; + set => this.Set((int)MsiDigitalSignatureTupleFields.Table, value); + } + + public string SignObject + { + get => (string)this.Fields[(int)MsiDigitalSignatureTupleFields.SignObject]?.Value; + set => this.Set((int)MsiDigitalSignatureTupleFields.SignObject, value); + } + + public string DigitalCertificate_ + { + get => (string)this.Fields[(int)MsiDigitalSignatureTupleFields.DigitalCertificate_]?.Value; + set => this.Set((int)MsiDigitalSignatureTupleFields.DigitalCertificate_, value); + } + + public string Hash + { + get => (string)this.Fields[(int)MsiDigitalSignatureTupleFields.Hash]?.Value; + set => this.Set((int)MsiDigitalSignatureTupleFields.Hash, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/MsiEmbeddedChainerTuple.cs b/src/WixToolset.Data/Tuples/MsiEmbeddedChainerTuple.cs new file mode 100644 index 00000000..7f1b7a2a --- /dev/null +++ b/src/WixToolset.Data/Tuples/MsiEmbeddedChainerTuple.cs @@ -0,0 +1,76 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition MsiEmbeddedChainer = new IntermediateTupleDefinition( + TupleDefinitionType.MsiEmbeddedChainer, + new[] + { + new IntermediateFieldDefinition(nameof(MsiEmbeddedChainerTupleFields.MsiEmbeddedChainer), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(MsiEmbeddedChainerTupleFields.Condition), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(MsiEmbeddedChainerTupleFields.CommandLine), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(MsiEmbeddedChainerTupleFields.Source), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(MsiEmbeddedChainerTupleFields.Type), IntermediateFieldType.Number), + }, + typeof(MsiEmbeddedChainerTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum MsiEmbeddedChainerTupleFields + { + MsiEmbeddedChainer, + Condition, + CommandLine, + Source, + Type, + } + + public class MsiEmbeddedChainerTuple : IntermediateTuple + { + public MsiEmbeddedChainerTuple() : base(TupleDefinitions.MsiEmbeddedChainer, null, null) + { + } + + public MsiEmbeddedChainerTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.MsiEmbeddedChainer, sourceLineNumber, id) + { + } + + public IntermediateField this[MsiEmbeddedChainerTupleFields index] => this.Fields[(int)index]; + + public string MsiEmbeddedChainer + { + get => (string)this.Fields[(int)MsiEmbeddedChainerTupleFields.MsiEmbeddedChainer]?.Value; + set => this.Set((int)MsiEmbeddedChainerTupleFields.MsiEmbeddedChainer, value); + } + + public string Condition + { + get => (string)this.Fields[(int)MsiEmbeddedChainerTupleFields.Condition]?.Value; + set => this.Set((int)MsiEmbeddedChainerTupleFields.Condition, value); + } + + public string CommandLine + { + get => (string)this.Fields[(int)MsiEmbeddedChainerTupleFields.CommandLine]?.Value; + set => this.Set((int)MsiEmbeddedChainerTupleFields.CommandLine, value); + } + + public string Source + { + get => (string)this.Fields[(int)MsiEmbeddedChainerTupleFields.Source]?.Value; + set => this.Set((int)MsiEmbeddedChainerTupleFields.Source, value); + } + + public int Type + { + get => (int)this.Fields[(int)MsiEmbeddedChainerTupleFields.Type]?.Value; + set => this.Set((int)MsiEmbeddedChainerTupleFields.Type, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/MsiEmbeddedUITuple.cs b/src/WixToolset.Data/Tuples/MsiEmbeddedUITuple.cs new file mode 100644 index 00000000..82deb53a --- /dev/null +++ b/src/WixToolset.Data/Tuples/MsiEmbeddedUITuple.cs @@ -0,0 +1,76 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition MsiEmbeddedUI = new IntermediateTupleDefinition( + TupleDefinitionType.MsiEmbeddedUI, + new[] + { + new IntermediateFieldDefinition(nameof(MsiEmbeddedUITupleFields.MsiEmbeddedUI), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(MsiEmbeddedUITupleFields.FileName), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(MsiEmbeddedUITupleFields.Attributes), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(MsiEmbeddedUITupleFields.MessageFilter), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(MsiEmbeddedUITupleFields.Data), IntermediateFieldType.Path), + }, + typeof(MsiEmbeddedUITuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum MsiEmbeddedUITupleFields + { + MsiEmbeddedUI, + FileName, + Attributes, + MessageFilter, + Data, + } + + public class MsiEmbeddedUITuple : IntermediateTuple + { + public MsiEmbeddedUITuple() : base(TupleDefinitions.MsiEmbeddedUI, null, null) + { + } + + public MsiEmbeddedUITuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.MsiEmbeddedUI, sourceLineNumber, id) + { + } + + public IntermediateField this[MsiEmbeddedUITupleFields index] => this.Fields[(int)index]; + + public string MsiEmbeddedUI + { + get => (string)this.Fields[(int)MsiEmbeddedUITupleFields.MsiEmbeddedUI]?.Value; + set => this.Set((int)MsiEmbeddedUITupleFields.MsiEmbeddedUI, value); + } + + public string FileName + { + get => (string)this.Fields[(int)MsiEmbeddedUITupleFields.FileName]?.Value; + set => this.Set((int)MsiEmbeddedUITupleFields.FileName, value); + } + + public int Attributes + { + get => (int)this.Fields[(int)MsiEmbeddedUITupleFields.Attributes]?.Value; + set => this.Set((int)MsiEmbeddedUITupleFields.Attributes, value); + } + + public int MessageFilter + { + get => (int)this.Fields[(int)MsiEmbeddedUITupleFields.MessageFilter]?.Value; + set => this.Set((int)MsiEmbeddedUITupleFields.MessageFilter, value); + } + + public string Data + { + get => (string)this.Fields[(int)MsiEmbeddedUITupleFields.Data]?.Value; + set => this.Set((int)MsiEmbeddedUITupleFields.Data, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/MsiFileHashTuple.cs b/src/WixToolset.Data/Tuples/MsiFileHashTuple.cs new file mode 100644 index 00000000..2850bc22 --- /dev/null +++ b/src/WixToolset.Data/Tuples/MsiFileHashTuple.cs @@ -0,0 +1,84 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition MsiFileHash = new IntermediateTupleDefinition( + TupleDefinitionType.MsiFileHash, + new[] + { + new IntermediateFieldDefinition(nameof(MsiFileHashTupleFields.File_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(MsiFileHashTupleFields.Options), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(MsiFileHashTupleFields.HashPart1), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(MsiFileHashTupleFields.HashPart2), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(MsiFileHashTupleFields.HashPart3), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(MsiFileHashTupleFields.HashPart4), IntermediateFieldType.Number), + }, + typeof(MsiFileHashTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum MsiFileHashTupleFields + { + File_, + Options, + HashPart1, + HashPart2, + HashPart3, + HashPart4, + } + + public class MsiFileHashTuple : IntermediateTuple + { + public MsiFileHashTuple() : base(TupleDefinitions.MsiFileHash, null, null) + { + } + + public MsiFileHashTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.MsiFileHash, sourceLineNumber, id) + { + } + + public IntermediateField this[MsiFileHashTupleFields index] => this.Fields[(int)index]; + + public string File_ + { + get => (string)this.Fields[(int)MsiFileHashTupleFields.File_]?.Value; + set => this.Set((int)MsiFileHashTupleFields.File_, value); + } + + public int Options + { + get => (int)this.Fields[(int)MsiFileHashTupleFields.Options]?.Value; + set => this.Set((int)MsiFileHashTupleFields.Options, value); + } + + public int HashPart1 + { + get => (int)this.Fields[(int)MsiFileHashTupleFields.HashPart1]?.Value; + set => this.Set((int)MsiFileHashTupleFields.HashPart1, value); + } + + public int HashPart2 + { + get => (int)this.Fields[(int)MsiFileHashTupleFields.HashPart2]?.Value; + set => this.Set((int)MsiFileHashTupleFields.HashPart2, value); + } + + public int HashPart3 + { + get => (int)this.Fields[(int)MsiFileHashTupleFields.HashPart3]?.Value; + set => this.Set((int)MsiFileHashTupleFields.HashPart3, value); + } + + public int HashPart4 + { + get => (int)this.Fields[(int)MsiFileHashTupleFields.HashPart4]?.Value; + set => this.Set((int)MsiFileHashTupleFields.HashPart4, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/MsiLockPermissionsExTuple.cs b/src/WixToolset.Data/Tuples/MsiLockPermissionsExTuple.cs new file mode 100644 index 00000000..14fc62a3 --- /dev/null +++ b/src/WixToolset.Data/Tuples/MsiLockPermissionsExTuple.cs @@ -0,0 +1,76 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition MsiLockPermissionsEx = new IntermediateTupleDefinition( + TupleDefinitionType.MsiLockPermissionsEx, + new[] + { + new IntermediateFieldDefinition(nameof(MsiLockPermissionsExTupleFields.MsiLockPermissionsEx), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(MsiLockPermissionsExTupleFields.LockObject), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(MsiLockPermissionsExTupleFields.Table), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(MsiLockPermissionsExTupleFields.SDDLText), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(MsiLockPermissionsExTupleFields.Condition), IntermediateFieldType.String), + }, + typeof(MsiLockPermissionsExTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum MsiLockPermissionsExTupleFields + { + MsiLockPermissionsEx, + LockObject, + Table, + SDDLText, + Condition, + } + + public class MsiLockPermissionsExTuple : IntermediateTuple + { + public MsiLockPermissionsExTuple() : base(TupleDefinitions.MsiLockPermissionsEx, null, null) + { + } + + public MsiLockPermissionsExTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.MsiLockPermissionsEx, sourceLineNumber, id) + { + } + + public IntermediateField this[MsiLockPermissionsExTupleFields index] => this.Fields[(int)index]; + + public string MsiLockPermissionsEx + { + get => (string)this.Fields[(int)MsiLockPermissionsExTupleFields.MsiLockPermissionsEx]?.Value; + set => this.Set((int)MsiLockPermissionsExTupleFields.MsiLockPermissionsEx, value); + } + + public string LockObject + { + get => (string)this.Fields[(int)MsiLockPermissionsExTupleFields.LockObject]?.Value; + set => this.Set((int)MsiLockPermissionsExTupleFields.LockObject, value); + } + + public string Table + { + get => (string)this.Fields[(int)MsiLockPermissionsExTupleFields.Table]?.Value; + set => this.Set((int)MsiLockPermissionsExTupleFields.Table, value); + } + + public string SDDLText + { + get => (string)this.Fields[(int)MsiLockPermissionsExTupleFields.SDDLText]?.Value; + set => this.Set((int)MsiLockPermissionsExTupleFields.SDDLText, value); + } + + public string Condition + { + get => (string)this.Fields[(int)MsiLockPermissionsExTupleFields.Condition]?.Value; + set => this.Set((int)MsiLockPermissionsExTupleFields.Condition, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/MsiPackageCertificateTuple.cs b/src/WixToolset.Data/Tuples/MsiPackageCertificateTuple.cs new file mode 100644 index 00000000..6eeb141c --- /dev/null +++ b/src/WixToolset.Data/Tuples/MsiPackageCertificateTuple.cs @@ -0,0 +1,52 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition MsiPackageCertificate = new IntermediateTupleDefinition( + TupleDefinitionType.MsiPackageCertificate, + new[] + { + new IntermediateFieldDefinition(nameof(MsiPackageCertificateTupleFields.PackageCertificate), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(MsiPackageCertificateTupleFields.DigitalCertificate_), IntermediateFieldType.String), + }, + typeof(MsiPackageCertificateTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum MsiPackageCertificateTupleFields + { + PackageCertificate, + DigitalCertificate_, + } + + public class MsiPackageCertificateTuple : IntermediateTuple + { + public MsiPackageCertificateTuple() : base(TupleDefinitions.MsiPackageCertificate, null, null) + { + } + + public MsiPackageCertificateTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.MsiPackageCertificate, sourceLineNumber, id) + { + } + + public IntermediateField this[MsiPackageCertificateTupleFields index] => this.Fields[(int)index]; + + public string PackageCertificate + { + get => (string)this.Fields[(int)MsiPackageCertificateTupleFields.PackageCertificate]?.Value; + set => this.Set((int)MsiPackageCertificateTupleFields.PackageCertificate, value); + } + + public string DigitalCertificate_ + { + get => (string)this.Fields[(int)MsiPackageCertificateTupleFields.DigitalCertificate_]?.Value; + set => this.Set((int)MsiPackageCertificateTupleFields.DigitalCertificate_, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/MsiPatchCertificateTuple.cs b/src/WixToolset.Data/Tuples/MsiPatchCertificateTuple.cs new file mode 100644 index 00000000..1b02dca9 --- /dev/null +++ b/src/WixToolset.Data/Tuples/MsiPatchCertificateTuple.cs @@ -0,0 +1,52 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition MsiPatchCertificate = new IntermediateTupleDefinition( + TupleDefinitionType.MsiPatchCertificate, + new[] + { + new IntermediateFieldDefinition(nameof(MsiPatchCertificateTupleFields.PatchCertificate), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(MsiPatchCertificateTupleFields.DigitalCertificate_), IntermediateFieldType.String), + }, + typeof(MsiPatchCertificateTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum MsiPatchCertificateTupleFields + { + PatchCertificate, + DigitalCertificate_, + } + + public class MsiPatchCertificateTuple : IntermediateTuple + { + public MsiPatchCertificateTuple() : base(TupleDefinitions.MsiPatchCertificate, null, null) + { + } + + public MsiPatchCertificateTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.MsiPatchCertificate, sourceLineNumber, id) + { + } + + public IntermediateField this[MsiPatchCertificateTupleFields index] => this.Fields[(int)index]; + + public string PatchCertificate + { + get => (string)this.Fields[(int)MsiPatchCertificateTupleFields.PatchCertificate]?.Value; + set => this.Set((int)MsiPatchCertificateTupleFields.PatchCertificate, value); + } + + public string DigitalCertificate_ + { + get => (string)this.Fields[(int)MsiPatchCertificateTupleFields.DigitalCertificate_]?.Value; + set => this.Set((int)MsiPatchCertificateTupleFields.DigitalCertificate_, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/MsiPatchHeadersTuple.cs b/src/WixToolset.Data/Tuples/MsiPatchHeadersTuple.cs new file mode 100644 index 00000000..6d99a9ae --- /dev/null +++ b/src/WixToolset.Data/Tuples/MsiPatchHeadersTuple.cs @@ -0,0 +1,52 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition MsiPatchHeaders = new IntermediateTupleDefinition( + TupleDefinitionType.MsiPatchHeaders, + new[] + { + new IntermediateFieldDefinition(nameof(MsiPatchHeadersTupleFields.StreamRef), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(MsiPatchHeadersTupleFields.Header), IntermediateFieldType.Path), + }, + typeof(MsiPatchHeadersTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum MsiPatchHeadersTupleFields + { + StreamRef, + Header, + } + + public class MsiPatchHeadersTuple : IntermediateTuple + { + public MsiPatchHeadersTuple() : base(TupleDefinitions.MsiPatchHeaders, null, null) + { + } + + public MsiPatchHeadersTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.MsiPatchHeaders, sourceLineNumber, id) + { + } + + public IntermediateField this[MsiPatchHeadersTupleFields index] => this.Fields[(int)index]; + + public string StreamRef + { + get => (string)this.Fields[(int)MsiPatchHeadersTupleFields.StreamRef]?.Value; + set => this.Set((int)MsiPatchHeadersTupleFields.StreamRef, value); + } + + public string Header + { + get => (string)this.Fields[(int)MsiPatchHeadersTupleFields.Header]?.Value; + set => this.Set((int)MsiPatchHeadersTupleFields.Header, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/MsiPatchMetadataTuple.cs b/src/WixToolset.Data/Tuples/MsiPatchMetadataTuple.cs new file mode 100644 index 00000000..f6a6fd7d --- /dev/null +++ b/src/WixToolset.Data/Tuples/MsiPatchMetadataTuple.cs @@ -0,0 +1,60 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition MsiPatchMetadata = new IntermediateTupleDefinition( + TupleDefinitionType.MsiPatchMetadata, + new[] + { + new IntermediateFieldDefinition(nameof(MsiPatchMetadataTupleFields.Company), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(MsiPatchMetadataTupleFields.Property), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(MsiPatchMetadataTupleFields.Value), IntermediateFieldType.String), + }, + typeof(MsiPatchMetadataTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum MsiPatchMetadataTupleFields + { + Company, + Property, + Value, + } + + public class MsiPatchMetadataTuple : IntermediateTuple + { + public MsiPatchMetadataTuple() : base(TupleDefinitions.MsiPatchMetadata, null, null) + { + } + + public MsiPatchMetadataTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.MsiPatchMetadata, sourceLineNumber, id) + { + } + + public IntermediateField this[MsiPatchMetadataTupleFields index] => this.Fields[(int)index]; + + public string Company + { + get => (string)this.Fields[(int)MsiPatchMetadataTupleFields.Company]?.Value; + set => this.Set((int)MsiPatchMetadataTupleFields.Company, value); + } + + public string Property + { + get => (string)this.Fields[(int)MsiPatchMetadataTupleFields.Property]?.Value; + set => this.Set((int)MsiPatchMetadataTupleFields.Property, value); + } + + public string Value + { + get => (string)this.Fields[(int)MsiPatchMetadataTupleFields.Value]?.Value; + set => this.Set((int)MsiPatchMetadataTupleFields.Value, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/MsiPatchOldAssemblyFileTuple.cs b/src/WixToolset.Data/Tuples/MsiPatchOldAssemblyFileTuple.cs new file mode 100644 index 00000000..f23ace77 --- /dev/null +++ b/src/WixToolset.Data/Tuples/MsiPatchOldAssemblyFileTuple.cs @@ -0,0 +1,52 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition MsiPatchOldAssemblyFile = new IntermediateTupleDefinition( + TupleDefinitionType.MsiPatchOldAssemblyFile, + new[] + { + new IntermediateFieldDefinition(nameof(MsiPatchOldAssemblyFileTupleFields.File_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(MsiPatchOldAssemblyFileTupleFields.Assembly_), IntermediateFieldType.String), + }, + typeof(MsiPatchOldAssemblyFileTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum MsiPatchOldAssemblyFileTupleFields + { + File_, + Assembly_, + } + + public class MsiPatchOldAssemblyFileTuple : IntermediateTuple + { + public MsiPatchOldAssemblyFileTuple() : base(TupleDefinitions.MsiPatchOldAssemblyFile, null, null) + { + } + + public MsiPatchOldAssemblyFileTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.MsiPatchOldAssemblyFile, sourceLineNumber, id) + { + } + + public IntermediateField this[MsiPatchOldAssemblyFileTupleFields index] => this.Fields[(int)index]; + + public string File_ + { + get => (string)this.Fields[(int)MsiPatchOldAssemblyFileTupleFields.File_]?.Value; + set => this.Set((int)MsiPatchOldAssemblyFileTupleFields.File_, value); + } + + public string Assembly_ + { + get => (string)this.Fields[(int)MsiPatchOldAssemblyFileTupleFields.Assembly_]?.Value; + set => this.Set((int)MsiPatchOldAssemblyFileTupleFields.Assembly_, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/MsiPatchOldAssemblyNameTuple.cs b/src/WixToolset.Data/Tuples/MsiPatchOldAssemblyNameTuple.cs new file mode 100644 index 00000000..77385f5f --- /dev/null +++ b/src/WixToolset.Data/Tuples/MsiPatchOldAssemblyNameTuple.cs @@ -0,0 +1,60 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition MsiPatchOldAssemblyName = new IntermediateTupleDefinition( + TupleDefinitionType.MsiPatchOldAssemblyName, + new[] + { + new IntermediateFieldDefinition(nameof(MsiPatchOldAssemblyNameTupleFields.Assembly), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(MsiPatchOldAssemblyNameTupleFields.Name), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(MsiPatchOldAssemblyNameTupleFields.Value), IntermediateFieldType.String), + }, + typeof(MsiPatchOldAssemblyNameTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum MsiPatchOldAssemblyNameTupleFields + { + Assembly, + Name, + Value, + } + + public class MsiPatchOldAssemblyNameTuple : IntermediateTuple + { + public MsiPatchOldAssemblyNameTuple() : base(TupleDefinitions.MsiPatchOldAssemblyName, null, null) + { + } + + public MsiPatchOldAssemblyNameTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.MsiPatchOldAssemblyName, sourceLineNumber, id) + { + } + + public IntermediateField this[MsiPatchOldAssemblyNameTupleFields index] => this.Fields[(int)index]; + + public string Assembly + { + get => (string)this.Fields[(int)MsiPatchOldAssemblyNameTupleFields.Assembly]?.Value; + set => this.Set((int)MsiPatchOldAssemblyNameTupleFields.Assembly, value); + } + + public string Name + { + get => (string)this.Fields[(int)MsiPatchOldAssemblyNameTupleFields.Name]?.Value; + set => this.Set((int)MsiPatchOldAssemblyNameTupleFields.Name, value); + } + + public string Value + { + get => (string)this.Fields[(int)MsiPatchOldAssemblyNameTupleFields.Value]?.Value; + set => this.Set((int)MsiPatchOldAssemblyNameTupleFields.Value, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/MsiPatchSequenceTuple.cs b/src/WixToolset.Data/Tuples/MsiPatchSequenceTuple.cs new file mode 100644 index 00000000..c48be28f --- /dev/null +++ b/src/WixToolset.Data/Tuples/MsiPatchSequenceTuple.cs @@ -0,0 +1,68 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition MsiPatchSequence = new IntermediateTupleDefinition( + TupleDefinitionType.MsiPatchSequence, + new[] + { + new IntermediateFieldDefinition(nameof(MsiPatchSequenceTupleFields.PatchFamily), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(MsiPatchSequenceTupleFields.ProductCode), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(MsiPatchSequenceTupleFields.Sequence), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(MsiPatchSequenceTupleFields.Attributes), IntermediateFieldType.Number), + }, + typeof(MsiPatchSequenceTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum MsiPatchSequenceTupleFields + { + PatchFamily, + ProductCode, + Sequence, + Attributes, + } + + public class MsiPatchSequenceTuple : IntermediateTuple + { + public MsiPatchSequenceTuple() : base(TupleDefinitions.MsiPatchSequence, null, null) + { + } + + public MsiPatchSequenceTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.MsiPatchSequence, sourceLineNumber, id) + { + } + + public IntermediateField this[MsiPatchSequenceTupleFields index] => this.Fields[(int)index]; + + public string PatchFamily + { + get => (string)this.Fields[(int)MsiPatchSequenceTupleFields.PatchFamily]?.Value; + set => this.Set((int)MsiPatchSequenceTupleFields.PatchFamily, value); + } + + public string ProductCode + { + get => (string)this.Fields[(int)MsiPatchSequenceTupleFields.ProductCode]?.Value; + set => this.Set((int)MsiPatchSequenceTupleFields.ProductCode, value); + } + + public string Sequence + { + get => (string)this.Fields[(int)MsiPatchSequenceTupleFields.Sequence]?.Value; + set => this.Set((int)MsiPatchSequenceTupleFields.Sequence, value); + } + + public int Attributes + { + get => (int)this.Fields[(int)MsiPatchSequenceTupleFields.Attributes]?.Value; + set => this.Set((int)MsiPatchSequenceTupleFields.Attributes, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/MsiServiceConfigFailureActionsTuple.cs b/src/WixToolset.Data/Tuples/MsiServiceConfigFailureActionsTuple.cs new file mode 100644 index 00000000..043be793 --- /dev/null +++ b/src/WixToolset.Data/Tuples/MsiServiceConfigFailureActionsTuple.cs @@ -0,0 +1,108 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition MsiServiceConfigFailureActions = new IntermediateTupleDefinition( + TupleDefinitionType.MsiServiceConfigFailureActions, + new[] + { + new IntermediateFieldDefinition(nameof(MsiServiceConfigFailureActionsTupleFields.MsiServiceConfigFailureActions), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(MsiServiceConfigFailureActionsTupleFields.Name), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(MsiServiceConfigFailureActionsTupleFields.Event), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(MsiServiceConfigFailureActionsTupleFields.ResetPeriod), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(MsiServiceConfigFailureActionsTupleFields.RebootMessage), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(MsiServiceConfigFailureActionsTupleFields.Command), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(MsiServiceConfigFailureActionsTupleFields.Actions), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(MsiServiceConfigFailureActionsTupleFields.DelayActions), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(MsiServiceConfigFailureActionsTupleFields.Component_), IntermediateFieldType.String), + }, + typeof(MsiServiceConfigFailureActionsTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum MsiServiceConfigFailureActionsTupleFields + { + MsiServiceConfigFailureActions, + Name, + Event, + ResetPeriod, + RebootMessage, + Command, + Actions, + DelayActions, + Component_, + } + + public class MsiServiceConfigFailureActionsTuple : IntermediateTuple + { + public MsiServiceConfigFailureActionsTuple() : base(TupleDefinitions.MsiServiceConfigFailureActions, null, null) + { + } + + public MsiServiceConfigFailureActionsTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.MsiServiceConfigFailureActions, sourceLineNumber, id) + { + } + + public IntermediateField this[MsiServiceConfigFailureActionsTupleFields index] => this.Fields[(int)index]; + + public string MsiServiceConfigFailureActions + { + get => (string)this.Fields[(int)MsiServiceConfigFailureActionsTupleFields.MsiServiceConfigFailureActions]?.Value; + set => this.Set((int)MsiServiceConfigFailureActionsTupleFields.MsiServiceConfigFailureActions, value); + } + + public string Name + { + get => (string)this.Fields[(int)MsiServiceConfigFailureActionsTupleFields.Name]?.Value; + set => this.Set((int)MsiServiceConfigFailureActionsTupleFields.Name, value); + } + + public int Event + { + get => (int)this.Fields[(int)MsiServiceConfigFailureActionsTupleFields.Event]?.Value; + set => this.Set((int)MsiServiceConfigFailureActionsTupleFields.Event, value); + } + + public int ResetPeriod + { + get => (int)this.Fields[(int)MsiServiceConfigFailureActionsTupleFields.ResetPeriod]?.Value; + set => this.Set((int)MsiServiceConfigFailureActionsTupleFields.ResetPeriod, value); + } + + public string RebootMessage + { + get => (string)this.Fields[(int)MsiServiceConfigFailureActionsTupleFields.RebootMessage]?.Value; + set => this.Set((int)MsiServiceConfigFailureActionsTupleFields.RebootMessage, value); + } + + public string Command + { + get => (string)this.Fields[(int)MsiServiceConfigFailureActionsTupleFields.Command]?.Value; + set => this.Set((int)MsiServiceConfigFailureActionsTupleFields.Command, value); + } + + public string Actions + { + get => (string)this.Fields[(int)MsiServiceConfigFailureActionsTupleFields.Actions]?.Value; + set => this.Set((int)MsiServiceConfigFailureActionsTupleFields.Actions, value); + } + + public string DelayActions + { + get => (string)this.Fields[(int)MsiServiceConfigFailureActionsTupleFields.DelayActions]?.Value; + set => this.Set((int)MsiServiceConfigFailureActionsTupleFields.DelayActions, value); + } + + public string Component_ + { + get => (string)this.Fields[(int)MsiServiceConfigFailureActionsTupleFields.Component_]?.Value; + set => this.Set((int)MsiServiceConfigFailureActionsTupleFields.Component_, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/MsiServiceConfigTuple.cs b/src/WixToolset.Data/Tuples/MsiServiceConfigTuple.cs new file mode 100644 index 00000000..701d85b4 --- /dev/null +++ b/src/WixToolset.Data/Tuples/MsiServiceConfigTuple.cs @@ -0,0 +1,84 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition MsiServiceConfig = new IntermediateTupleDefinition( + TupleDefinitionType.MsiServiceConfig, + new[] + { + new IntermediateFieldDefinition(nameof(MsiServiceConfigTupleFields.MsiServiceConfig), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(MsiServiceConfigTupleFields.Name), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(MsiServiceConfigTupleFields.Event), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(MsiServiceConfigTupleFields.ConfigType), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(MsiServiceConfigTupleFields.Argument), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(MsiServiceConfigTupleFields.Component_), IntermediateFieldType.String), + }, + typeof(MsiServiceConfigTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum MsiServiceConfigTupleFields + { + MsiServiceConfig, + Name, + Event, + ConfigType, + Argument, + Component_, + } + + public class MsiServiceConfigTuple : IntermediateTuple + { + public MsiServiceConfigTuple() : base(TupleDefinitions.MsiServiceConfig, null, null) + { + } + + public MsiServiceConfigTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.MsiServiceConfig, sourceLineNumber, id) + { + } + + public IntermediateField this[MsiServiceConfigTupleFields index] => this.Fields[(int)index]; + + public string MsiServiceConfig + { + get => (string)this.Fields[(int)MsiServiceConfigTupleFields.MsiServiceConfig]?.Value; + set => this.Set((int)MsiServiceConfigTupleFields.MsiServiceConfig, value); + } + + public string Name + { + get => (string)this.Fields[(int)MsiServiceConfigTupleFields.Name]?.Value; + set => this.Set((int)MsiServiceConfigTupleFields.Name, value); + } + + public int Event + { + get => (int)this.Fields[(int)MsiServiceConfigTupleFields.Event]?.Value; + set => this.Set((int)MsiServiceConfigTupleFields.Event, value); + } + + public int ConfigType + { + get => (int)this.Fields[(int)MsiServiceConfigTupleFields.ConfigType]?.Value; + set => this.Set((int)MsiServiceConfigTupleFields.ConfigType, value); + } + + public string Argument + { + get => (string)this.Fields[(int)MsiServiceConfigTupleFields.Argument]?.Value; + set => this.Set((int)MsiServiceConfigTupleFields.Argument, value); + } + + public string Component_ + { + get => (string)this.Fields[(int)MsiServiceConfigTupleFields.Component_]?.Value; + set => this.Set((int)MsiServiceConfigTupleFields.Component_, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/MsiShortcutPropertyTuple.cs b/src/WixToolset.Data/Tuples/MsiShortcutPropertyTuple.cs new file mode 100644 index 00000000..9ee6b2f2 --- /dev/null +++ b/src/WixToolset.Data/Tuples/MsiShortcutPropertyTuple.cs @@ -0,0 +1,68 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition MsiShortcutProperty = new IntermediateTupleDefinition( + TupleDefinitionType.MsiShortcutProperty, + new[] + { + new IntermediateFieldDefinition(nameof(MsiShortcutPropertyTupleFields.MsiShortcutProperty), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(MsiShortcutPropertyTupleFields.Shortcut_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(MsiShortcutPropertyTupleFields.PropertyKey), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(MsiShortcutPropertyTupleFields.PropVariantValue), IntermediateFieldType.String), + }, + typeof(MsiShortcutPropertyTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum MsiShortcutPropertyTupleFields + { + MsiShortcutProperty, + Shortcut_, + PropertyKey, + PropVariantValue, + } + + public class MsiShortcutPropertyTuple : IntermediateTuple + { + public MsiShortcutPropertyTuple() : base(TupleDefinitions.MsiShortcutProperty, null, null) + { + } + + public MsiShortcutPropertyTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.MsiShortcutProperty, sourceLineNumber, id) + { + } + + public IntermediateField this[MsiShortcutPropertyTupleFields index] => this.Fields[(int)index]; + + public string MsiShortcutProperty + { + get => (string)this.Fields[(int)MsiShortcutPropertyTupleFields.MsiShortcutProperty]?.Value; + set => this.Set((int)MsiShortcutPropertyTupleFields.MsiShortcutProperty, value); + } + + public string Shortcut_ + { + get => (string)this.Fields[(int)MsiShortcutPropertyTupleFields.Shortcut_]?.Value; + set => this.Set((int)MsiShortcutPropertyTupleFields.Shortcut_, value); + } + + public string PropertyKey + { + get => (string)this.Fields[(int)MsiShortcutPropertyTupleFields.PropertyKey]?.Value; + set => this.Set((int)MsiShortcutPropertyTupleFields.PropertyKey, value); + } + + public string PropVariantValue + { + get => (string)this.Fields[(int)MsiShortcutPropertyTupleFields.PropVariantValue]?.Value; + set => this.Set((int)MsiShortcutPropertyTupleFields.PropVariantValue, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/ODBCAttributeTuple.cs b/src/WixToolset.Data/Tuples/ODBCAttributeTuple.cs new file mode 100644 index 00000000..de4f88cd --- /dev/null +++ b/src/WixToolset.Data/Tuples/ODBCAttributeTuple.cs @@ -0,0 +1,60 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition ODBCAttribute = new IntermediateTupleDefinition( + TupleDefinitionType.ODBCAttribute, + new[] + { + new IntermediateFieldDefinition(nameof(ODBCAttributeTupleFields.Driver_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ODBCAttributeTupleFields.Attribute), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ODBCAttributeTupleFields.Value), IntermediateFieldType.String), + }, + typeof(ODBCAttributeTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum ODBCAttributeTupleFields + { + Driver_, + Attribute, + Value, + } + + public class ODBCAttributeTuple : IntermediateTuple + { + public ODBCAttributeTuple() : base(TupleDefinitions.ODBCAttribute, null, null) + { + } + + public ODBCAttributeTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.ODBCAttribute, sourceLineNumber, id) + { + } + + public IntermediateField this[ODBCAttributeTupleFields index] => this.Fields[(int)index]; + + public string Driver_ + { + get => (string)this.Fields[(int)ODBCAttributeTupleFields.Driver_]?.Value; + set => this.Set((int)ODBCAttributeTupleFields.Driver_, value); + } + + public string Attribute + { + get => (string)this.Fields[(int)ODBCAttributeTupleFields.Attribute]?.Value; + set => this.Set((int)ODBCAttributeTupleFields.Attribute, value); + } + + public string Value + { + get => (string)this.Fields[(int)ODBCAttributeTupleFields.Value]?.Value; + set => this.Set((int)ODBCAttributeTupleFields.Value, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/ODBCDataSourceTuple.cs b/src/WixToolset.Data/Tuples/ODBCDataSourceTuple.cs new file mode 100644 index 00000000..c06b2da0 --- /dev/null +++ b/src/WixToolset.Data/Tuples/ODBCDataSourceTuple.cs @@ -0,0 +1,76 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition ODBCDataSource = new IntermediateTupleDefinition( + TupleDefinitionType.ODBCDataSource, + new[] + { + new IntermediateFieldDefinition(nameof(ODBCDataSourceTupleFields.DataSource), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ODBCDataSourceTupleFields.Component_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ODBCDataSourceTupleFields.Description), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ODBCDataSourceTupleFields.DriverDescription), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ODBCDataSourceTupleFields.Registration), IntermediateFieldType.Number), + }, + typeof(ODBCDataSourceTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum ODBCDataSourceTupleFields + { + DataSource, + Component_, + Description, + DriverDescription, + Registration, + } + + public class ODBCDataSourceTuple : IntermediateTuple + { + public ODBCDataSourceTuple() : base(TupleDefinitions.ODBCDataSource, null, null) + { + } + + public ODBCDataSourceTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.ODBCDataSource, sourceLineNumber, id) + { + } + + public IntermediateField this[ODBCDataSourceTupleFields index] => this.Fields[(int)index]; + + public string DataSource + { + get => (string)this.Fields[(int)ODBCDataSourceTupleFields.DataSource]?.Value; + set => this.Set((int)ODBCDataSourceTupleFields.DataSource, value); + } + + public string Component_ + { + get => (string)this.Fields[(int)ODBCDataSourceTupleFields.Component_]?.Value; + set => this.Set((int)ODBCDataSourceTupleFields.Component_, value); + } + + public string Description + { + get => (string)this.Fields[(int)ODBCDataSourceTupleFields.Description]?.Value; + set => this.Set((int)ODBCDataSourceTupleFields.Description, value); + } + + public string DriverDescription + { + get => (string)this.Fields[(int)ODBCDataSourceTupleFields.DriverDescription]?.Value; + set => this.Set((int)ODBCDataSourceTupleFields.DriverDescription, value); + } + + public int Registration + { + get => (int)this.Fields[(int)ODBCDataSourceTupleFields.Registration]?.Value; + set => this.Set((int)ODBCDataSourceTupleFields.Registration, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/ODBCDriverTuple.cs b/src/WixToolset.Data/Tuples/ODBCDriverTuple.cs new file mode 100644 index 00000000..ab40ee88 --- /dev/null +++ b/src/WixToolset.Data/Tuples/ODBCDriverTuple.cs @@ -0,0 +1,76 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition ODBCDriver = new IntermediateTupleDefinition( + TupleDefinitionType.ODBCDriver, + new[] + { + new IntermediateFieldDefinition(nameof(ODBCDriverTupleFields.Driver), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ODBCDriverTupleFields.Component_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ODBCDriverTupleFields.Description), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ODBCDriverTupleFields.File_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ODBCDriverTupleFields.File_Setup), IntermediateFieldType.String), + }, + typeof(ODBCDriverTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum ODBCDriverTupleFields + { + Driver, + Component_, + Description, + File_, + File_Setup, + } + + public class ODBCDriverTuple : IntermediateTuple + { + public ODBCDriverTuple() : base(TupleDefinitions.ODBCDriver, null, null) + { + } + + public ODBCDriverTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.ODBCDriver, sourceLineNumber, id) + { + } + + public IntermediateField this[ODBCDriverTupleFields index] => this.Fields[(int)index]; + + public string Driver + { + get => (string)this.Fields[(int)ODBCDriverTupleFields.Driver]?.Value; + set => this.Set((int)ODBCDriverTupleFields.Driver, value); + } + + public string Component_ + { + get => (string)this.Fields[(int)ODBCDriverTupleFields.Component_]?.Value; + set => this.Set((int)ODBCDriverTupleFields.Component_, value); + } + + public string Description + { + get => (string)this.Fields[(int)ODBCDriverTupleFields.Description]?.Value; + set => this.Set((int)ODBCDriverTupleFields.Description, value); + } + + public string File_ + { + get => (string)this.Fields[(int)ODBCDriverTupleFields.File_]?.Value; + set => this.Set((int)ODBCDriverTupleFields.File_, value); + } + + public string File_Setup + { + get => (string)this.Fields[(int)ODBCDriverTupleFields.File_Setup]?.Value; + set => this.Set((int)ODBCDriverTupleFields.File_Setup, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/ODBCSourceAttributeTuple.cs b/src/WixToolset.Data/Tuples/ODBCSourceAttributeTuple.cs new file mode 100644 index 00000000..541eb532 --- /dev/null +++ b/src/WixToolset.Data/Tuples/ODBCSourceAttributeTuple.cs @@ -0,0 +1,60 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition ODBCSourceAttribute = new IntermediateTupleDefinition( + TupleDefinitionType.ODBCSourceAttribute, + new[] + { + new IntermediateFieldDefinition(nameof(ODBCSourceAttributeTupleFields.DataSource_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ODBCSourceAttributeTupleFields.Attribute), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ODBCSourceAttributeTupleFields.Value), IntermediateFieldType.String), + }, + typeof(ODBCSourceAttributeTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum ODBCSourceAttributeTupleFields + { + DataSource_, + Attribute, + Value, + } + + public class ODBCSourceAttributeTuple : IntermediateTuple + { + public ODBCSourceAttributeTuple() : base(TupleDefinitions.ODBCSourceAttribute, null, null) + { + } + + public ODBCSourceAttributeTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.ODBCSourceAttribute, sourceLineNumber, id) + { + } + + public IntermediateField this[ODBCSourceAttributeTupleFields index] => this.Fields[(int)index]; + + public string DataSource_ + { + get => (string)this.Fields[(int)ODBCSourceAttributeTupleFields.DataSource_]?.Value; + set => this.Set((int)ODBCSourceAttributeTupleFields.DataSource_, value); + } + + public string Attribute + { + get => (string)this.Fields[(int)ODBCSourceAttributeTupleFields.Attribute]?.Value; + set => this.Set((int)ODBCSourceAttributeTupleFields.Attribute, value); + } + + public string Value + { + get => (string)this.Fields[(int)ODBCSourceAttributeTupleFields.Value]?.Value; + set => this.Set((int)ODBCSourceAttributeTupleFields.Value, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/ODBCTranslatorTuple.cs b/src/WixToolset.Data/Tuples/ODBCTranslatorTuple.cs new file mode 100644 index 00000000..ab1abbdc --- /dev/null +++ b/src/WixToolset.Data/Tuples/ODBCTranslatorTuple.cs @@ -0,0 +1,76 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition ODBCTranslator = new IntermediateTupleDefinition( + TupleDefinitionType.ODBCTranslator, + new[] + { + new IntermediateFieldDefinition(nameof(ODBCTranslatorTupleFields.Translator), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ODBCTranslatorTupleFields.Component_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ODBCTranslatorTupleFields.Description), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ODBCTranslatorTupleFields.File_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ODBCTranslatorTupleFields.File_Setup), IntermediateFieldType.String), + }, + typeof(ODBCTranslatorTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum ODBCTranslatorTupleFields + { + Translator, + Component_, + Description, + File_, + File_Setup, + } + + public class ODBCTranslatorTuple : IntermediateTuple + { + public ODBCTranslatorTuple() : base(TupleDefinitions.ODBCTranslator, null, null) + { + } + + public ODBCTranslatorTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.ODBCTranslator, sourceLineNumber, id) + { + } + + public IntermediateField this[ODBCTranslatorTupleFields index] => this.Fields[(int)index]; + + public string Translator + { + get => (string)this.Fields[(int)ODBCTranslatorTupleFields.Translator]?.Value; + set => this.Set((int)ODBCTranslatorTupleFields.Translator, value); + } + + public string Component_ + { + get => (string)this.Fields[(int)ODBCTranslatorTupleFields.Component_]?.Value; + set => this.Set((int)ODBCTranslatorTupleFields.Component_, value); + } + + public string Description + { + get => (string)this.Fields[(int)ODBCTranslatorTupleFields.Description]?.Value; + set => this.Set((int)ODBCTranslatorTupleFields.Description, value); + } + + public string File_ + { + get => (string)this.Fields[(int)ODBCTranslatorTupleFields.File_]?.Value; + set => this.Set((int)ODBCTranslatorTupleFields.File_, value); + } + + public string File_Setup + { + get => (string)this.Fields[(int)ODBCTranslatorTupleFields.File_Setup]?.Value; + set => this.Set((int)ODBCTranslatorTupleFields.File_Setup, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/PatchMetadataTuple.cs b/src/WixToolset.Data/Tuples/PatchMetadataTuple.cs new file mode 100644 index 00000000..d596e58e --- /dev/null +++ b/src/WixToolset.Data/Tuples/PatchMetadataTuple.cs @@ -0,0 +1,60 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition PatchMetadata = new IntermediateTupleDefinition( + TupleDefinitionType.PatchMetadata, + new[] + { + new IntermediateFieldDefinition(nameof(PatchMetadataTupleFields.Company), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(PatchMetadataTupleFields.Property), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(PatchMetadataTupleFields.Value), IntermediateFieldType.String), + }, + typeof(PatchMetadataTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum PatchMetadataTupleFields + { + Company, + Property, + Value, + } + + public class PatchMetadataTuple : IntermediateTuple + { + public PatchMetadataTuple() : base(TupleDefinitions.PatchMetadata, null, null) + { + } + + public PatchMetadataTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.PatchMetadata, sourceLineNumber, id) + { + } + + public IntermediateField this[PatchMetadataTupleFields index] => this.Fields[(int)index]; + + public string Company + { + get => (string)this.Fields[(int)PatchMetadataTupleFields.Company]?.Value; + set => this.Set((int)PatchMetadataTupleFields.Company, value); + } + + public string Property + { + get => (string)this.Fields[(int)PatchMetadataTupleFields.Property]?.Value; + set => this.Set((int)PatchMetadataTupleFields.Property, value); + } + + public string Value + { + get => (string)this.Fields[(int)PatchMetadataTupleFields.Value]?.Value; + set => this.Set((int)PatchMetadataTupleFields.Value, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/PatchPackageTuple.cs b/src/WixToolset.Data/Tuples/PatchPackageTuple.cs new file mode 100644 index 00000000..276d00a2 --- /dev/null +++ b/src/WixToolset.Data/Tuples/PatchPackageTuple.cs @@ -0,0 +1,52 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition PatchPackage = new IntermediateTupleDefinition( + TupleDefinitionType.PatchPackage, + new[] + { + new IntermediateFieldDefinition(nameof(PatchPackageTupleFields.PatchId), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(PatchPackageTupleFields.Media_), IntermediateFieldType.Number), + }, + typeof(PatchPackageTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum PatchPackageTupleFields + { + PatchId, + Media_, + } + + public class PatchPackageTuple : IntermediateTuple + { + public PatchPackageTuple() : base(TupleDefinitions.PatchPackage, null, null) + { + } + + public PatchPackageTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.PatchPackage, sourceLineNumber, id) + { + } + + public IntermediateField this[PatchPackageTupleFields index] => this.Fields[(int)index]; + + public string PatchId + { + get => (string)this.Fields[(int)PatchPackageTupleFields.PatchId]?.Value; + set => this.Set((int)PatchPackageTupleFields.PatchId, value); + } + + public int Media_ + { + get => (int)this.Fields[(int)PatchPackageTupleFields.Media_]?.Value; + set => this.Set((int)PatchPackageTupleFields.Media_, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/PatchSequenceTuple.cs b/src/WixToolset.Data/Tuples/PatchSequenceTuple.cs new file mode 100644 index 00000000..624054c1 --- /dev/null +++ b/src/WixToolset.Data/Tuples/PatchSequenceTuple.cs @@ -0,0 +1,68 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition PatchSequence = new IntermediateTupleDefinition( + TupleDefinitionType.PatchSequence, + new[] + { + new IntermediateFieldDefinition(nameof(PatchSequenceTupleFields.PatchFamily), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(PatchSequenceTupleFields.Target), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(PatchSequenceTupleFields.Sequence), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(PatchSequenceTupleFields.Supersede), IntermediateFieldType.Number), + }, + typeof(PatchSequenceTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum PatchSequenceTupleFields + { + PatchFamily, + Target, + Sequence, + Supersede, + } + + public class PatchSequenceTuple : IntermediateTuple + { + public PatchSequenceTuple() : base(TupleDefinitions.PatchSequence, null, null) + { + } + + public PatchSequenceTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.PatchSequence, sourceLineNumber, id) + { + } + + public IntermediateField this[PatchSequenceTupleFields index] => this.Fields[(int)index]; + + public string PatchFamily + { + get => (string)this.Fields[(int)PatchSequenceTupleFields.PatchFamily]?.Value; + set => this.Set((int)PatchSequenceTupleFields.PatchFamily, value); + } + + public string Target + { + get => (string)this.Fields[(int)PatchSequenceTupleFields.Target]?.Value; + set => this.Set((int)PatchSequenceTupleFields.Target, value); + } + + public string Sequence + { + get => (string)this.Fields[(int)PatchSequenceTupleFields.Sequence]?.Value; + set => this.Set((int)PatchSequenceTupleFields.Sequence, value); + } + + public int Supersede + { + get => (int)this.Fields[(int)PatchSequenceTupleFields.Supersede]?.Value; + set => this.Set((int)PatchSequenceTupleFields.Supersede, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/PatchTuple.cs b/src/WixToolset.Data/Tuples/PatchTuple.cs new file mode 100644 index 00000000..268307c7 --- /dev/null +++ b/src/WixToolset.Data/Tuples/PatchTuple.cs @@ -0,0 +1,84 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition Patch = new IntermediateTupleDefinition( + TupleDefinitionType.Patch, + new[] + { + new IntermediateFieldDefinition(nameof(PatchTupleFields.File_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(PatchTupleFields.Sequence), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(PatchTupleFields.PatchSize), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(PatchTupleFields.Attributes), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(PatchTupleFields.Header), IntermediateFieldType.Path), + new IntermediateFieldDefinition(nameof(PatchTupleFields.StreamRef_), IntermediateFieldType.String), + }, + typeof(PatchTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum PatchTupleFields + { + File_, + Sequence, + PatchSize, + Attributes, + Header, + StreamRef_, + } + + public class PatchTuple : IntermediateTuple + { + public PatchTuple() : base(TupleDefinitions.Patch, null, null) + { + } + + public PatchTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.Patch, sourceLineNumber, id) + { + } + + public IntermediateField this[PatchTupleFields index] => this.Fields[(int)index]; + + public string File_ + { + get => (string)this.Fields[(int)PatchTupleFields.File_]?.Value; + set => this.Set((int)PatchTupleFields.File_, value); + } + + public int Sequence + { + get => (int)this.Fields[(int)PatchTupleFields.Sequence]?.Value; + set => this.Set((int)PatchTupleFields.Sequence, value); + } + + public int PatchSize + { + get => (int)this.Fields[(int)PatchTupleFields.PatchSize]?.Value; + set => this.Set((int)PatchTupleFields.PatchSize, value); + } + + public int Attributes + { + get => (int)this.Fields[(int)PatchTupleFields.Attributes]?.Value; + set => this.Set((int)PatchTupleFields.Attributes, value); + } + + public string Header + { + get => (string)this.Fields[(int)PatchTupleFields.Header]?.Value; + set => this.Set((int)PatchTupleFields.Header, value); + } + + public string StreamRef_ + { + get => (string)this.Fields[(int)PatchTupleFields.StreamRef_]?.Value; + set => this.Set((int)PatchTupleFields.StreamRef_, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/ProgIdTuple.cs b/src/WixToolset.Data/Tuples/ProgIdTuple.cs new file mode 100644 index 00000000..a1713392 --- /dev/null +++ b/src/WixToolset.Data/Tuples/ProgIdTuple.cs @@ -0,0 +1,84 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition ProgId = new IntermediateTupleDefinition( + TupleDefinitionType.ProgId, + new[] + { + new IntermediateFieldDefinition(nameof(ProgIdTupleFields.ProgId), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ProgIdTupleFields.ProgId_Parent), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ProgIdTupleFields.Class_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ProgIdTupleFields.Description), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ProgIdTupleFields.Icon_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ProgIdTupleFields.IconIndex), IntermediateFieldType.Number), + }, + typeof(ProgIdTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum ProgIdTupleFields + { + ProgId, + ProgId_Parent, + Class_, + Description, + Icon_, + IconIndex, + } + + public class ProgIdTuple : IntermediateTuple + { + public ProgIdTuple() : base(TupleDefinitions.ProgId, null, null) + { + } + + public ProgIdTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.ProgId, sourceLineNumber, id) + { + } + + public IntermediateField this[ProgIdTupleFields index] => this.Fields[(int)index]; + + public string ProgId + { + get => (string)this.Fields[(int)ProgIdTupleFields.ProgId]?.Value; + set => this.Set((int)ProgIdTupleFields.ProgId, value); + } + + public string ProgId_Parent + { + get => (string)this.Fields[(int)ProgIdTupleFields.ProgId_Parent]?.Value; + set => this.Set((int)ProgIdTupleFields.ProgId_Parent, value); + } + + public string Class_ + { + get => (string)this.Fields[(int)ProgIdTupleFields.Class_]?.Value; + set => this.Set((int)ProgIdTupleFields.Class_, value); + } + + public string Description + { + get => (string)this.Fields[(int)ProgIdTupleFields.Description]?.Value; + set => this.Set((int)ProgIdTupleFields.Description, value); + } + + public string Icon_ + { + get => (string)this.Fields[(int)ProgIdTupleFields.Icon_]?.Value; + set => this.Set((int)ProgIdTupleFields.Icon_, value); + } + + public int IconIndex + { + get => (int)this.Fields[(int)ProgIdTupleFields.IconIndex]?.Value; + set => this.Set((int)ProgIdTupleFields.IconIndex, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/PropertiesTuple.cs b/src/WixToolset.Data/Tuples/PropertiesTuple.cs new file mode 100644 index 00000000..6aafaa51 --- /dev/null +++ b/src/WixToolset.Data/Tuples/PropertiesTuple.cs @@ -0,0 +1,52 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition Properties = new IntermediateTupleDefinition( + TupleDefinitionType.Properties, + new[] + { + new IntermediateFieldDefinition(nameof(PropertiesTupleFields.Name), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(PropertiesTupleFields.Value), IntermediateFieldType.String), + }, + typeof(PropertiesTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum PropertiesTupleFields + { + Name, + Value, + } + + public class PropertiesTuple : IntermediateTuple + { + public PropertiesTuple() : base(TupleDefinitions.Properties, null, null) + { + } + + public PropertiesTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.Properties, sourceLineNumber, id) + { + } + + public IntermediateField this[PropertiesTupleFields index] => this.Fields[(int)index]; + + public string Name + { + get => (string)this.Fields[(int)PropertiesTupleFields.Name]?.Value; + set => this.Set((int)PropertiesTupleFields.Name, value); + } + + public string Value + { + get => (string)this.Fields[(int)PropertiesTupleFields.Value]?.Value; + set => this.Set((int)PropertiesTupleFields.Value, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/PropertyTuple.cs b/src/WixToolset.Data/Tuples/PropertyTuple.cs new file mode 100644 index 00000000..120b01fb --- /dev/null +++ b/src/WixToolset.Data/Tuples/PropertyTuple.cs @@ -0,0 +1,52 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition Property = new IntermediateTupleDefinition( + TupleDefinitionType.Property, + new[] + { + new IntermediateFieldDefinition(nameof(PropertyTupleFields.Property), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(PropertyTupleFields.Value), IntermediateFieldType.String), + }, + typeof(PropertyTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum PropertyTupleFields + { + Property, + Value, + } + + public class PropertyTuple : IntermediateTuple + { + public PropertyTuple() : base(TupleDefinitions.Property, null, null) + { + } + + public PropertyTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.Property, sourceLineNumber, id) + { + } + + public IntermediateField this[PropertyTupleFields index] => this.Fields[(int)index]; + + public string Property + { + get => (string)this.Fields[(int)PropertyTupleFields.Property]?.Value; + set => this.Set((int)PropertyTupleFields.Property, value); + } + + public string Value + { + get => (string)this.Fields[(int)PropertyTupleFields.Value]?.Value; + set => this.Set((int)PropertyTupleFields.Value, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/PublishComponentTuple.cs b/src/WixToolset.Data/Tuples/PublishComponentTuple.cs new file mode 100644 index 00000000..d17da1bb --- /dev/null +++ b/src/WixToolset.Data/Tuples/PublishComponentTuple.cs @@ -0,0 +1,76 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition PublishComponent = new IntermediateTupleDefinition( + TupleDefinitionType.PublishComponent, + new[] + { + new IntermediateFieldDefinition(nameof(PublishComponentTupleFields.ComponentId), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(PublishComponentTupleFields.Qualifier), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(PublishComponentTupleFields.Component_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(PublishComponentTupleFields.AppData), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(PublishComponentTupleFields.Feature_), IntermediateFieldType.String), + }, + typeof(PublishComponentTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum PublishComponentTupleFields + { + ComponentId, + Qualifier, + Component_, + AppData, + Feature_, + } + + public class PublishComponentTuple : IntermediateTuple + { + public PublishComponentTuple() : base(TupleDefinitions.PublishComponent, null, null) + { + } + + public PublishComponentTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.PublishComponent, sourceLineNumber, id) + { + } + + public IntermediateField this[PublishComponentTupleFields index] => this.Fields[(int)index]; + + public string ComponentId + { + get => (string)this.Fields[(int)PublishComponentTupleFields.ComponentId]?.Value; + set => this.Set((int)PublishComponentTupleFields.ComponentId, value); + } + + public string Qualifier + { + get => (string)this.Fields[(int)PublishComponentTupleFields.Qualifier]?.Value; + set => this.Set((int)PublishComponentTupleFields.Qualifier, value); + } + + public string Component_ + { + get => (string)this.Fields[(int)PublishComponentTupleFields.Component_]?.Value; + set => this.Set((int)PublishComponentTupleFields.Component_, value); + } + + public string AppData + { + get => (string)this.Fields[(int)PublishComponentTupleFields.AppData]?.Value; + set => this.Set((int)PublishComponentTupleFields.AppData, value); + } + + public string Feature_ + { + get => (string)this.Fields[(int)PublishComponentTupleFields.Feature_]?.Value; + set => this.Set((int)PublishComponentTupleFields.Feature_, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/RadioButtonTuple.cs b/src/WixToolset.Data/Tuples/RadioButtonTuple.cs new file mode 100644 index 00000000..420577dc --- /dev/null +++ b/src/WixToolset.Data/Tuples/RadioButtonTuple.cs @@ -0,0 +1,108 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition RadioButton = new IntermediateTupleDefinition( + TupleDefinitionType.RadioButton, + new[] + { + new IntermediateFieldDefinition(nameof(RadioButtonTupleFields.Property), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(RadioButtonTupleFields.Order), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(RadioButtonTupleFields.Value), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(RadioButtonTupleFields.X), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(RadioButtonTupleFields.Y), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(RadioButtonTupleFields.Width), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(RadioButtonTupleFields.Height), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(RadioButtonTupleFields.Text), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(RadioButtonTupleFields.Help), IntermediateFieldType.String), + }, + typeof(RadioButtonTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum RadioButtonTupleFields + { + Property, + Order, + Value, + X, + Y, + Width, + Height, + Text, + Help, + } + + public class RadioButtonTuple : IntermediateTuple + { + public RadioButtonTuple() : base(TupleDefinitions.RadioButton, null, null) + { + } + + public RadioButtonTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.RadioButton, sourceLineNumber, id) + { + } + + public IntermediateField this[RadioButtonTupleFields index] => this.Fields[(int)index]; + + public string Property + { + get => (string)this.Fields[(int)RadioButtonTupleFields.Property]?.Value; + set => this.Set((int)RadioButtonTupleFields.Property, value); + } + + public int Order + { + get => (int)this.Fields[(int)RadioButtonTupleFields.Order]?.Value; + set => this.Set((int)RadioButtonTupleFields.Order, value); + } + + public string Value + { + get => (string)this.Fields[(int)RadioButtonTupleFields.Value]?.Value; + set => this.Set((int)RadioButtonTupleFields.Value, value); + } + + public int X + { + get => (int)this.Fields[(int)RadioButtonTupleFields.X]?.Value; + set => this.Set((int)RadioButtonTupleFields.X, value); + } + + public int Y + { + get => (int)this.Fields[(int)RadioButtonTupleFields.Y]?.Value; + set => this.Set((int)RadioButtonTupleFields.Y, value); + } + + public int Width + { + get => (int)this.Fields[(int)RadioButtonTupleFields.Width]?.Value; + set => this.Set((int)RadioButtonTupleFields.Width, value); + } + + public int Height + { + get => (int)this.Fields[(int)RadioButtonTupleFields.Height]?.Value; + set => this.Set((int)RadioButtonTupleFields.Height, value); + } + + public string Text + { + get => (string)this.Fields[(int)RadioButtonTupleFields.Text]?.Value; + set => this.Set((int)RadioButtonTupleFields.Text, value); + } + + public string Help + { + get => (string)this.Fields[(int)RadioButtonTupleFields.Help]?.Value; + set => this.Set((int)RadioButtonTupleFields.Help, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/RegLocatorTuple.cs b/src/WixToolset.Data/Tuples/RegLocatorTuple.cs new file mode 100644 index 00000000..b098e687 --- /dev/null +++ b/src/WixToolset.Data/Tuples/RegLocatorTuple.cs @@ -0,0 +1,76 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition RegLocator = new IntermediateTupleDefinition( + TupleDefinitionType.RegLocator, + new[] + { + new IntermediateFieldDefinition(nameof(RegLocatorTupleFields.Signature_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(RegLocatorTupleFields.Root), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(RegLocatorTupleFields.Key), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(RegLocatorTupleFields.Name), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(RegLocatorTupleFields.Type), IntermediateFieldType.Number), + }, + typeof(RegLocatorTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum RegLocatorTupleFields + { + Signature_, + Root, + Key, + Name, + Type, + } + + public class RegLocatorTuple : IntermediateTuple + { + public RegLocatorTuple() : base(TupleDefinitions.RegLocator, null, null) + { + } + + public RegLocatorTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.RegLocator, sourceLineNumber, id) + { + } + + public IntermediateField this[RegLocatorTupleFields index] => this.Fields[(int)index]; + + public string Signature_ + { + get => (string)this.Fields[(int)RegLocatorTupleFields.Signature_]?.Value; + set => this.Set((int)RegLocatorTupleFields.Signature_, value); + } + + public int Root + { + get => (int)this.Fields[(int)RegLocatorTupleFields.Root]?.Value; + set => this.Set((int)RegLocatorTupleFields.Root, value); + } + + public string Key + { + get => (string)this.Fields[(int)RegLocatorTupleFields.Key]?.Value; + set => this.Set((int)RegLocatorTupleFields.Key, value); + } + + public string Name + { + get => (string)this.Fields[(int)RegLocatorTupleFields.Name]?.Value; + set => this.Set((int)RegLocatorTupleFields.Name, value); + } + + public int Type + { + get => (int)this.Fields[(int)RegLocatorTupleFields.Type]?.Value; + set => this.Set((int)RegLocatorTupleFields.Type, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/RegistryTuple.cs b/src/WixToolset.Data/Tuples/RegistryTuple.cs new file mode 100644 index 00000000..a82cd5ee --- /dev/null +++ b/src/WixToolset.Data/Tuples/RegistryTuple.cs @@ -0,0 +1,84 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition Registry = new IntermediateTupleDefinition( + TupleDefinitionType.Registry, + new[] + { + new IntermediateFieldDefinition(nameof(RegistryTupleFields.Registry), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(RegistryTupleFields.Root), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(RegistryTupleFields.Key), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(RegistryTupleFields.Name), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(RegistryTupleFields.Value), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(RegistryTupleFields.Component_), IntermediateFieldType.String), + }, + typeof(RegistryTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum RegistryTupleFields + { + Registry, + Root, + Key, + Name, + Value, + Component_, + } + + public class RegistryTuple : IntermediateTuple + { + public RegistryTuple() : base(TupleDefinitions.Registry, null, null) + { + } + + public RegistryTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.Registry, sourceLineNumber, id) + { + } + + public IntermediateField this[RegistryTupleFields index] => this.Fields[(int)index]; + + public string Registry + { + get => (string)this.Fields[(int)RegistryTupleFields.Registry]?.Value; + set => this.Set((int)RegistryTupleFields.Registry, value); + } + + public int Root + { + get => (int)this.Fields[(int)RegistryTupleFields.Root]?.Value; + set => this.Set((int)RegistryTupleFields.Root, value); + } + + public string Key + { + get => (string)this.Fields[(int)RegistryTupleFields.Key]?.Value; + set => this.Set((int)RegistryTupleFields.Key, value); + } + + public string Name + { + get => (string)this.Fields[(int)RegistryTupleFields.Name]?.Value; + set => this.Set((int)RegistryTupleFields.Name, value); + } + + public string Value + { + get => (string)this.Fields[(int)RegistryTupleFields.Value]?.Value; + set => this.Set((int)RegistryTupleFields.Value, value); + } + + public string Component_ + { + get => (string)this.Fields[(int)RegistryTupleFields.Component_]?.Value; + set => this.Set((int)RegistryTupleFields.Component_, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/RemoveFileTuple.cs b/src/WixToolset.Data/Tuples/RemoveFileTuple.cs new file mode 100644 index 00000000..1860172f --- /dev/null +++ b/src/WixToolset.Data/Tuples/RemoveFileTuple.cs @@ -0,0 +1,76 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition RemoveFile = new IntermediateTupleDefinition( + TupleDefinitionType.RemoveFile, + new[] + { + new IntermediateFieldDefinition(nameof(RemoveFileTupleFields.FileKey), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(RemoveFileTupleFields.Component_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(RemoveFileTupleFields.FileName), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(RemoveFileTupleFields.DirProperty), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(RemoveFileTupleFields.InstallMode), IntermediateFieldType.Number), + }, + typeof(RemoveFileTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum RemoveFileTupleFields + { + FileKey, + Component_, + FileName, + DirProperty, + InstallMode, + } + + public class RemoveFileTuple : IntermediateTuple + { + public RemoveFileTuple() : base(TupleDefinitions.RemoveFile, null, null) + { + } + + public RemoveFileTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.RemoveFile, sourceLineNumber, id) + { + } + + public IntermediateField this[RemoveFileTupleFields index] => this.Fields[(int)index]; + + public string FileKey + { + get => (string)this.Fields[(int)RemoveFileTupleFields.FileKey]?.Value; + set => this.Set((int)RemoveFileTupleFields.FileKey, value); + } + + public string Component_ + { + get => (string)this.Fields[(int)RemoveFileTupleFields.Component_]?.Value; + set => this.Set((int)RemoveFileTupleFields.Component_, value); + } + + public string FileName + { + get => (string)this.Fields[(int)RemoveFileTupleFields.FileName]?.Value; + set => this.Set((int)RemoveFileTupleFields.FileName, value); + } + + public string DirProperty + { + get => (string)this.Fields[(int)RemoveFileTupleFields.DirProperty]?.Value; + set => this.Set((int)RemoveFileTupleFields.DirProperty, value); + } + + public int InstallMode + { + get => (int)this.Fields[(int)RemoveFileTupleFields.InstallMode]?.Value; + set => this.Set((int)RemoveFileTupleFields.InstallMode, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/RemoveIniFileTuple.cs b/src/WixToolset.Data/Tuples/RemoveIniFileTuple.cs new file mode 100644 index 00000000..e2e79560 --- /dev/null +++ b/src/WixToolset.Data/Tuples/RemoveIniFileTuple.cs @@ -0,0 +1,100 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition RemoveIniFile = new IntermediateTupleDefinition( + TupleDefinitionType.RemoveIniFile, + new[] + { + new IntermediateFieldDefinition(nameof(RemoveIniFileTupleFields.RemoveIniFile), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(RemoveIniFileTupleFields.FileName), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(RemoveIniFileTupleFields.DirProperty), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(RemoveIniFileTupleFields.Section), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(RemoveIniFileTupleFields.Key), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(RemoveIniFileTupleFields.Value), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(RemoveIniFileTupleFields.Action), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(RemoveIniFileTupleFields.Component_), IntermediateFieldType.String), + }, + typeof(RemoveIniFileTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum RemoveIniFileTupleFields + { + RemoveIniFile, + FileName, + DirProperty, + Section, + Key, + Value, + Action, + Component_, + } + + public class RemoveIniFileTuple : IntermediateTuple + { + public RemoveIniFileTuple() : base(TupleDefinitions.RemoveIniFile, null, null) + { + } + + public RemoveIniFileTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.RemoveIniFile, sourceLineNumber, id) + { + } + + public IntermediateField this[RemoveIniFileTupleFields index] => this.Fields[(int)index]; + + public string RemoveIniFile + { + get => (string)this.Fields[(int)RemoveIniFileTupleFields.RemoveIniFile]?.Value; + set => this.Set((int)RemoveIniFileTupleFields.RemoveIniFile, value); + } + + public string FileName + { + get => (string)this.Fields[(int)RemoveIniFileTupleFields.FileName]?.Value; + set => this.Set((int)RemoveIniFileTupleFields.FileName, value); + } + + public string DirProperty + { + get => (string)this.Fields[(int)RemoveIniFileTupleFields.DirProperty]?.Value; + set => this.Set((int)RemoveIniFileTupleFields.DirProperty, value); + } + + public string Section + { + get => (string)this.Fields[(int)RemoveIniFileTupleFields.Section]?.Value; + set => this.Set((int)RemoveIniFileTupleFields.Section, value); + } + + public string Key + { + get => (string)this.Fields[(int)RemoveIniFileTupleFields.Key]?.Value; + set => this.Set((int)RemoveIniFileTupleFields.Key, value); + } + + public string Value + { + get => (string)this.Fields[(int)RemoveIniFileTupleFields.Value]?.Value; + set => this.Set((int)RemoveIniFileTupleFields.Value, value); + } + + public int Action + { + get => (int)this.Fields[(int)RemoveIniFileTupleFields.Action]?.Value; + set => this.Set((int)RemoveIniFileTupleFields.Action, value); + } + + public string Component_ + { + get => (string)this.Fields[(int)RemoveIniFileTupleFields.Component_]?.Value; + set => this.Set((int)RemoveIniFileTupleFields.Component_, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/RemoveRegistryTuple.cs b/src/WixToolset.Data/Tuples/RemoveRegistryTuple.cs new file mode 100644 index 00000000..154aad67 --- /dev/null +++ b/src/WixToolset.Data/Tuples/RemoveRegistryTuple.cs @@ -0,0 +1,76 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition RemoveRegistry = new IntermediateTupleDefinition( + TupleDefinitionType.RemoveRegistry, + new[] + { + new IntermediateFieldDefinition(nameof(RemoveRegistryTupleFields.RemoveRegistry), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(RemoveRegistryTupleFields.Root), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(RemoveRegistryTupleFields.Key), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(RemoveRegistryTupleFields.Name), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(RemoveRegistryTupleFields.Component_), IntermediateFieldType.String), + }, + typeof(RemoveRegistryTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum RemoveRegistryTupleFields + { + RemoveRegistry, + Root, + Key, + Name, + Component_, + } + + public class RemoveRegistryTuple : IntermediateTuple + { + public RemoveRegistryTuple() : base(TupleDefinitions.RemoveRegistry, null, null) + { + } + + public RemoveRegistryTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.RemoveRegistry, sourceLineNumber, id) + { + } + + public IntermediateField this[RemoveRegistryTupleFields index] => this.Fields[(int)index]; + + public string RemoveRegistry + { + get => (string)this.Fields[(int)RemoveRegistryTupleFields.RemoveRegistry]?.Value; + set => this.Set((int)RemoveRegistryTupleFields.RemoveRegistry, value); + } + + public int Root + { + get => (int)this.Fields[(int)RemoveRegistryTupleFields.Root]?.Value; + set => this.Set((int)RemoveRegistryTupleFields.Root, value); + } + + public string Key + { + get => (string)this.Fields[(int)RemoveRegistryTupleFields.Key]?.Value; + set => this.Set((int)RemoveRegistryTupleFields.Key, value); + } + + public string Name + { + get => (string)this.Fields[(int)RemoveRegistryTupleFields.Name]?.Value; + set => this.Set((int)RemoveRegistryTupleFields.Name, value); + } + + public string Component_ + { + get => (string)this.Fields[(int)RemoveRegistryTupleFields.Component_]?.Value; + set => this.Set((int)RemoveRegistryTupleFields.Component_, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/ReserveCostTuple.cs b/src/WixToolset.Data/Tuples/ReserveCostTuple.cs new file mode 100644 index 00000000..769ac4b2 --- /dev/null +++ b/src/WixToolset.Data/Tuples/ReserveCostTuple.cs @@ -0,0 +1,76 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition ReserveCost = new IntermediateTupleDefinition( + TupleDefinitionType.ReserveCost, + new[] + { + new IntermediateFieldDefinition(nameof(ReserveCostTupleFields.ReserveKey), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ReserveCostTupleFields.Component_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ReserveCostTupleFields.ReserveFolder), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ReserveCostTupleFields.ReserveLocal), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(ReserveCostTupleFields.ReserveSource), IntermediateFieldType.Number), + }, + typeof(ReserveCostTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum ReserveCostTupleFields + { + ReserveKey, + Component_, + ReserveFolder, + ReserveLocal, + ReserveSource, + } + + public class ReserveCostTuple : IntermediateTuple + { + public ReserveCostTuple() : base(TupleDefinitions.ReserveCost, null, null) + { + } + + public ReserveCostTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.ReserveCost, sourceLineNumber, id) + { + } + + public IntermediateField this[ReserveCostTupleFields index] => this.Fields[(int)index]; + + public string ReserveKey + { + get => (string)this.Fields[(int)ReserveCostTupleFields.ReserveKey]?.Value; + set => this.Set((int)ReserveCostTupleFields.ReserveKey, value); + } + + public string Component_ + { + get => (string)this.Fields[(int)ReserveCostTupleFields.Component_]?.Value; + set => this.Set((int)ReserveCostTupleFields.Component_, value); + } + + public string ReserveFolder + { + get => (string)this.Fields[(int)ReserveCostTupleFields.ReserveFolder]?.Value; + set => this.Set((int)ReserveCostTupleFields.ReserveFolder, value); + } + + public int ReserveLocal + { + get => (int)this.Fields[(int)ReserveCostTupleFields.ReserveLocal]?.Value; + set => this.Set((int)ReserveCostTupleFields.ReserveLocal, value); + } + + public int ReserveSource + { + get => (int)this.Fields[(int)ReserveCostTupleFields.ReserveSource]?.Value; + set => this.Set((int)ReserveCostTupleFields.ReserveSource, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/SFPCatalogTuple.cs b/src/WixToolset.Data/Tuples/SFPCatalogTuple.cs new file mode 100644 index 00000000..5db5f984 --- /dev/null +++ b/src/WixToolset.Data/Tuples/SFPCatalogTuple.cs @@ -0,0 +1,60 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition SFPCatalog = new IntermediateTupleDefinition( + TupleDefinitionType.SFPCatalog, + new[] + { + new IntermediateFieldDefinition(nameof(SFPCatalogTupleFields.SFPCatalog), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(SFPCatalogTupleFields.Catalog), IntermediateFieldType.Path), + new IntermediateFieldDefinition(nameof(SFPCatalogTupleFields.Dependency), IntermediateFieldType.String), + }, + typeof(SFPCatalogTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum SFPCatalogTupleFields + { + SFPCatalog, + Catalog, + Dependency, + } + + public class SFPCatalogTuple : IntermediateTuple + { + public SFPCatalogTuple() : base(TupleDefinitions.SFPCatalog, null, null) + { + } + + public SFPCatalogTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.SFPCatalog, sourceLineNumber, id) + { + } + + public IntermediateField this[SFPCatalogTupleFields index] => this.Fields[(int)index]; + + public string SFPCatalog + { + get => (string)this.Fields[(int)SFPCatalogTupleFields.SFPCatalog]?.Value; + set => this.Set((int)SFPCatalogTupleFields.SFPCatalog, value); + } + + public string Catalog + { + get => (string)this.Fields[(int)SFPCatalogTupleFields.Catalog]?.Value; + set => this.Set((int)SFPCatalogTupleFields.Catalog, value); + } + + public string Dependency + { + get => (string)this.Fields[(int)SFPCatalogTupleFields.Dependency]?.Value; + set => this.Set((int)SFPCatalogTupleFields.Dependency, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/SelfRegTuple.cs b/src/WixToolset.Data/Tuples/SelfRegTuple.cs new file mode 100644 index 00000000..b32127f3 --- /dev/null +++ b/src/WixToolset.Data/Tuples/SelfRegTuple.cs @@ -0,0 +1,52 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition SelfReg = new IntermediateTupleDefinition( + TupleDefinitionType.SelfReg, + new[] + { + new IntermediateFieldDefinition(nameof(SelfRegTupleFields.File_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(SelfRegTupleFields.Cost), IntermediateFieldType.Number), + }, + typeof(SelfRegTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum SelfRegTupleFields + { + File_, + Cost, + } + + public class SelfRegTuple : IntermediateTuple + { + public SelfRegTuple() : base(TupleDefinitions.SelfReg, null, null) + { + } + + public SelfRegTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.SelfReg, sourceLineNumber, id) + { + } + + public IntermediateField this[SelfRegTupleFields index] => this.Fields[(int)index]; + + public string File_ + { + get => (string)this.Fields[(int)SelfRegTupleFields.File_]?.Value; + set => this.Set((int)SelfRegTupleFields.File_, value); + } + + public int Cost + { + get => (int)this.Fields[(int)SelfRegTupleFields.Cost]?.Value; + set => this.Set((int)SelfRegTupleFields.Cost, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/ServiceControlTuple.cs b/src/WixToolset.Data/Tuples/ServiceControlTuple.cs new file mode 100644 index 00000000..a2cdc7a0 --- /dev/null +++ b/src/WixToolset.Data/Tuples/ServiceControlTuple.cs @@ -0,0 +1,84 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition ServiceControl = new IntermediateTupleDefinition( + TupleDefinitionType.ServiceControl, + new[] + { + new IntermediateFieldDefinition(nameof(ServiceControlTupleFields.ServiceControl), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ServiceControlTupleFields.Name), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ServiceControlTupleFields.Event), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(ServiceControlTupleFields.Arguments), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ServiceControlTupleFields.Wait), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(ServiceControlTupleFields.Component_), IntermediateFieldType.String), + }, + typeof(ServiceControlTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum ServiceControlTupleFields + { + ServiceControl, + Name, + Event, + Arguments, + Wait, + Component_, + } + + public class ServiceControlTuple : IntermediateTuple + { + public ServiceControlTuple() : base(TupleDefinitions.ServiceControl, null, null) + { + } + + public ServiceControlTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.ServiceControl, sourceLineNumber, id) + { + } + + public IntermediateField this[ServiceControlTupleFields index] => this.Fields[(int)index]; + + public string ServiceControl + { + get => (string)this.Fields[(int)ServiceControlTupleFields.ServiceControl]?.Value; + set => this.Set((int)ServiceControlTupleFields.ServiceControl, value); + } + + public string Name + { + get => (string)this.Fields[(int)ServiceControlTupleFields.Name]?.Value; + set => this.Set((int)ServiceControlTupleFields.Name, value); + } + + public int Event + { + get => (int)this.Fields[(int)ServiceControlTupleFields.Event]?.Value; + set => this.Set((int)ServiceControlTupleFields.Event, value); + } + + public string Arguments + { + get => (string)this.Fields[(int)ServiceControlTupleFields.Arguments]?.Value; + set => this.Set((int)ServiceControlTupleFields.Arguments, value); + } + + public int Wait + { + get => (int)this.Fields[(int)ServiceControlTupleFields.Wait]?.Value; + set => this.Set((int)ServiceControlTupleFields.Wait, value); + } + + public string Component_ + { + get => (string)this.Fields[(int)ServiceControlTupleFields.Component_]?.Value; + set => this.Set((int)ServiceControlTupleFields.Component_, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/ServiceInstallTuple.cs b/src/WixToolset.Data/Tuples/ServiceInstallTuple.cs new file mode 100644 index 00000000..cd02d21e --- /dev/null +++ b/src/WixToolset.Data/Tuples/ServiceInstallTuple.cs @@ -0,0 +1,140 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition ServiceInstall = new IntermediateTupleDefinition( + TupleDefinitionType.ServiceInstall, + new[] + { + new IntermediateFieldDefinition(nameof(ServiceInstallTupleFields.ServiceInstall), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ServiceInstallTupleFields.Name), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ServiceInstallTupleFields.DisplayName), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ServiceInstallTupleFields.ServiceType), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(ServiceInstallTupleFields.StartType), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(ServiceInstallTupleFields.ErrorControl), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(ServiceInstallTupleFields.LoadOrderGroup), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ServiceInstallTupleFields.Dependencies), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ServiceInstallTupleFields.StartName), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ServiceInstallTupleFields.Password), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ServiceInstallTupleFields.Arguments), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ServiceInstallTupleFields.Component_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ServiceInstallTupleFields.Description), IntermediateFieldType.String), + }, + typeof(ServiceInstallTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum ServiceInstallTupleFields + { + ServiceInstall, + Name, + DisplayName, + ServiceType, + StartType, + ErrorControl, + LoadOrderGroup, + Dependencies, + StartName, + Password, + Arguments, + Component_, + Description, + } + + public class ServiceInstallTuple : IntermediateTuple + { + public ServiceInstallTuple() : base(TupleDefinitions.ServiceInstall, null, null) + { + } + + public ServiceInstallTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.ServiceInstall, sourceLineNumber, id) + { + } + + public IntermediateField this[ServiceInstallTupleFields index] => this.Fields[(int)index]; + + public string ServiceInstall + { + get => (string)this.Fields[(int)ServiceInstallTupleFields.ServiceInstall]?.Value; + set => this.Set((int)ServiceInstallTupleFields.ServiceInstall, value); + } + + public string Name + { + get => (string)this.Fields[(int)ServiceInstallTupleFields.Name]?.Value; + set => this.Set((int)ServiceInstallTupleFields.Name, value); + } + + public string DisplayName + { + get => (string)this.Fields[(int)ServiceInstallTupleFields.DisplayName]?.Value; + set => this.Set((int)ServiceInstallTupleFields.DisplayName, value); + } + + public int ServiceType + { + get => (int)this.Fields[(int)ServiceInstallTupleFields.ServiceType]?.Value; + set => this.Set((int)ServiceInstallTupleFields.ServiceType, value); + } + + public int StartType + { + get => (int)this.Fields[(int)ServiceInstallTupleFields.StartType]?.Value; + set => this.Set((int)ServiceInstallTupleFields.StartType, value); + } + + public int ErrorControl + { + get => (int)this.Fields[(int)ServiceInstallTupleFields.ErrorControl]?.Value; + set => this.Set((int)ServiceInstallTupleFields.ErrorControl, value); + } + + public string LoadOrderGroup + { + get => (string)this.Fields[(int)ServiceInstallTupleFields.LoadOrderGroup]?.Value; + set => this.Set((int)ServiceInstallTupleFields.LoadOrderGroup, value); + } + + public string Dependencies + { + get => (string)this.Fields[(int)ServiceInstallTupleFields.Dependencies]?.Value; + set => this.Set((int)ServiceInstallTupleFields.Dependencies, value); + } + + public string StartName + { + get => (string)this.Fields[(int)ServiceInstallTupleFields.StartName]?.Value; + set => this.Set((int)ServiceInstallTupleFields.StartName, value); + } + + public string Password + { + get => (string)this.Fields[(int)ServiceInstallTupleFields.Password]?.Value; + set => this.Set((int)ServiceInstallTupleFields.Password, value); + } + + public string Arguments + { + get => (string)this.Fields[(int)ServiceInstallTupleFields.Arguments]?.Value; + set => this.Set((int)ServiceInstallTupleFields.Arguments, value); + } + + public string Component_ + { + get => (string)this.Fields[(int)ServiceInstallTupleFields.Component_]?.Value; + set => this.Set((int)ServiceInstallTupleFields.Component_, value); + } + + public string Description + { + get => (string)this.Fields[(int)ServiceInstallTupleFields.Description]?.Value; + set => this.Set((int)ServiceInstallTupleFields.Description, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/ShortcutTuple.cs b/src/WixToolset.Data/Tuples/ShortcutTuple.cs new file mode 100644 index 00000000..0591e7f4 --- /dev/null +++ b/src/WixToolset.Data/Tuples/ShortcutTuple.cs @@ -0,0 +1,164 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition Shortcut = new IntermediateTupleDefinition( + TupleDefinitionType.Shortcut, + new[] + { + new IntermediateFieldDefinition(nameof(ShortcutTupleFields.Shortcut), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ShortcutTupleFields.Directory_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ShortcutTupleFields.Name), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ShortcutTupleFields.Component_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ShortcutTupleFields.Target), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ShortcutTupleFields.Arguments), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ShortcutTupleFields.Description), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ShortcutTupleFields.Hotkey), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(ShortcutTupleFields.Icon_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ShortcutTupleFields.IconIndex), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(ShortcutTupleFields.ShowCmd), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(ShortcutTupleFields.WkDir), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ShortcutTupleFields.DisplayResourceDLL), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ShortcutTupleFields.DisplayResourceId), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(ShortcutTupleFields.DescriptionResourceDLL), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(ShortcutTupleFields.DescriptionResourceId), IntermediateFieldType.Number), + }, + typeof(ShortcutTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum ShortcutTupleFields + { + Shortcut, + Directory_, + Name, + Component_, + Target, + Arguments, + Description, + Hotkey, + Icon_, + IconIndex, + ShowCmd, + WkDir, + DisplayResourceDLL, + DisplayResourceId, + DescriptionResourceDLL, + DescriptionResourceId, + } + + public class ShortcutTuple : IntermediateTuple + { + public ShortcutTuple() : base(TupleDefinitions.Shortcut, null, null) + { + } + + public ShortcutTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.Shortcut, sourceLineNumber, id) + { + } + + public IntermediateField this[ShortcutTupleFields index] => this.Fields[(int)index]; + + public string Shortcut + { + get => (string)this.Fields[(int)ShortcutTupleFields.Shortcut]?.Value; + set => this.Set((int)ShortcutTupleFields.Shortcut, value); + } + + public string Directory_ + { + get => (string)this.Fields[(int)ShortcutTupleFields.Directory_]?.Value; + set => this.Set((int)ShortcutTupleFields.Directory_, value); + } + + public string Name + { + get => (string)this.Fields[(int)ShortcutTupleFields.Name]?.Value; + set => this.Set((int)ShortcutTupleFields.Name, value); + } + + public string Component_ + { + get => (string)this.Fields[(int)ShortcutTupleFields.Component_]?.Value; + set => this.Set((int)ShortcutTupleFields.Component_, value); + } + + public string Target + { + get => (string)this.Fields[(int)ShortcutTupleFields.Target]?.Value; + set => this.Set((int)ShortcutTupleFields.Target, value); + } + + public string Arguments + { + get => (string)this.Fields[(int)ShortcutTupleFields.Arguments]?.Value; + set => this.Set((int)ShortcutTupleFields.Arguments, value); + } + + public string Description + { + get => (string)this.Fields[(int)ShortcutTupleFields.Description]?.Value; + set => this.Set((int)ShortcutTupleFields.Description, value); + } + + public int Hotkey + { + get => (int)this.Fields[(int)ShortcutTupleFields.Hotkey]?.Value; + set => this.Set((int)ShortcutTupleFields.Hotkey, value); + } + + public string Icon_ + { + get => (string)this.Fields[(int)ShortcutTupleFields.Icon_]?.Value; + set => this.Set((int)ShortcutTupleFields.Icon_, value); + } + + public int IconIndex + { + get => (int)this.Fields[(int)ShortcutTupleFields.IconIndex]?.Value; + set => this.Set((int)ShortcutTupleFields.IconIndex, value); + } + + public int ShowCmd + { + get => (int)this.Fields[(int)ShortcutTupleFields.ShowCmd]?.Value; + set => this.Set((int)ShortcutTupleFields.ShowCmd, value); + } + + public string WkDir + { + get => (string)this.Fields[(int)ShortcutTupleFields.WkDir]?.Value; + set => this.Set((int)ShortcutTupleFields.WkDir, value); + } + + public string DisplayResourceDLL + { + get => (string)this.Fields[(int)ShortcutTupleFields.DisplayResourceDLL]?.Value; + set => this.Set((int)ShortcutTupleFields.DisplayResourceDLL, value); + } + + public int DisplayResourceId + { + get => (int)this.Fields[(int)ShortcutTupleFields.DisplayResourceId]?.Value; + set => this.Set((int)ShortcutTupleFields.DisplayResourceId, value); + } + + public string DescriptionResourceDLL + { + get => (string)this.Fields[(int)ShortcutTupleFields.DescriptionResourceDLL]?.Value; + set => this.Set((int)ShortcutTupleFields.DescriptionResourceDLL, value); + } + + public int DescriptionResourceId + { + get => (int)this.Fields[(int)ShortcutTupleFields.DescriptionResourceId]?.Value; + set => this.Set((int)ShortcutTupleFields.DescriptionResourceId, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/SignatureTuple.cs b/src/WixToolset.Data/Tuples/SignatureTuple.cs new file mode 100644 index 00000000..b8dbf308 --- /dev/null +++ b/src/WixToolset.Data/Tuples/SignatureTuple.cs @@ -0,0 +1,108 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition Signature = new IntermediateTupleDefinition( + TupleDefinitionType.Signature, + new[] + { + new IntermediateFieldDefinition(nameof(SignatureTupleFields.Signature), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(SignatureTupleFields.FileName), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(SignatureTupleFields.MinVersion), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(SignatureTupleFields.MaxVersion), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(SignatureTupleFields.MinSize), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(SignatureTupleFields.MaxSize), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(SignatureTupleFields.MinDate), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(SignatureTupleFields.MaxDate), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(SignatureTupleFields.Languages), IntermediateFieldType.String), + }, + typeof(SignatureTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum SignatureTupleFields + { + Signature, + FileName, + MinVersion, + MaxVersion, + MinSize, + MaxSize, + MinDate, + MaxDate, + Languages, + } + + public class SignatureTuple : IntermediateTuple + { + public SignatureTuple() : base(TupleDefinitions.Signature, null, null) + { + } + + public SignatureTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.Signature, sourceLineNumber, id) + { + } + + public IntermediateField this[SignatureTupleFields index] => this.Fields[(int)index]; + + public string Signature + { + get => (string)this.Fields[(int)SignatureTupleFields.Signature]?.Value; + set => this.Set((int)SignatureTupleFields.Signature, value); + } + + public string FileName + { + get => (string)this.Fields[(int)SignatureTupleFields.FileName]?.Value; + set => this.Set((int)SignatureTupleFields.FileName, value); + } + + public string MinVersion + { + get => (string)this.Fields[(int)SignatureTupleFields.MinVersion]?.Value; + set => this.Set((int)SignatureTupleFields.MinVersion, value); + } + + public string MaxVersion + { + get => (string)this.Fields[(int)SignatureTupleFields.MaxVersion]?.Value; + set => this.Set((int)SignatureTupleFields.MaxVersion, value); + } + + public int MinSize + { + get => (int)this.Fields[(int)SignatureTupleFields.MinSize]?.Value; + set => this.Set((int)SignatureTupleFields.MinSize, value); + } + + public int MaxSize + { + get => (int)this.Fields[(int)SignatureTupleFields.MaxSize]?.Value; + set => this.Set((int)SignatureTupleFields.MaxSize, value); + } + + public int MinDate + { + get => (int)this.Fields[(int)SignatureTupleFields.MinDate]?.Value; + set => this.Set((int)SignatureTupleFields.MinDate, value); + } + + public int MaxDate + { + get => (int)this.Fields[(int)SignatureTupleFields.MaxDate]?.Value; + set => this.Set((int)SignatureTupleFields.MaxDate, value); + } + + public string Languages + { + get => (string)this.Fields[(int)SignatureTupleFields.Languages]?.Value; + set => this.Set((int)SignatureTupleFields.Languages, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/TargetFiles_OptionalDataTuple.cs b/src/WixToolset.Data/Tuples/TargetFiles_OptionalDataTuple.cs new file mode 100644 index 00000000..449c4afe --- /dev/null +++ b/src/WixToolset.Data/Tuples/TargetFiles_OptionalDataTuple.cs @@ -0,0 +1,84 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition TargetFiles_OptionalData = new IntermediateTupleDefinition( + TupleDefinitionType.TargetFiles_OptionalData, + new[] + { + new IntermediateFieldDefinition(nameof(TargetFiles_OptionalDataTupleFields.Target), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(TargetFiles_OptionalDataTupleFields.FTK), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(TargetFiles_OptionalDataTupleFields.SymbolPaths), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(TargetFiles_OptionalDataTupleFields.IgnoreOffsets), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(TargetFiles_OptionalDataTupleFields.IgnoreLengths), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(TargetFiles_OptionalDataTupleFields.RetainOffsets), IntermediateFieldType.String), + }, + typeof(TargetFiles_OptionalDataTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum TargetFiles_OptionalDataTupleFields + { + Target, + FTK, + SymbolPaths, + IgnoreOffsets, + IgnoreLengths, + RetainOffsets, + } + + public class TargetFiles_OptionalDataTuple : IntermediateTuple + { + public TargetFiles_OptionalDataTuple() : base(TupleDefinitions.TargetFiles_OptionalData, null, null) + { + } + + public TargetFiles_OptionalDataTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.TargetFiles_OptionalData, sourceLineNumber, id) + { + } + + public IntermediateField this[TargetFiles_OptionalDataTupleFields index] => this.Fields[(int)index]; + + public string Target + { + get => (string)this.Fields[(int)TargetFiles_OptionalDataTupleFields.Target]?.Value; + set => this.Set((int)TargetFiles_OptionalDataTupleFields.Target, value); + } + + public string FTK + { + get => (string)this.Fields[(int)TargetFiles_OptionalDataTupleFields.FTK]?.Value; + set => this.Set((int)TargetFiles_OptionalDataTupleFields.FTK, value); + } + + public string SymbolPaths + { + get => (string)this.Fields[(int)TargetFiles_OptionalDataTupleFields.SymbolPaths]?.Value; + set => this.Set((int)TargetFiles_OptionalDataTupleFields.SymbolPaths, value); + } + + public string IgnoreOffsets + { + get => (string)this.Fields[(int)TargetFiles_OptionalDataTupleFields.IgnoreOffsets]?.Value; + set => this.Set((int)TargetFiles_OptionalDataTupleFields.IgnoreOffsets, value); + } + + public string IgnoreLengths + { + get => (string)this.Fields[(int)TargetFiles_OptionalDataTupleFields.IgnoreLengths]?.Value; + set => this.Set((int)TargetFiles_OptionalDataTupleFields.IgnoreLengths, value); + } + + public string RetainOffsets + { + get => (string)this.Fields[(int)TargetFiles_OptionalDataTupleFields.RetainOffsets]?.Value; + set => this.Set((int)TargetFiles_OptionalDataTupleFields.RetainOffsets, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/TargetImagesTuple.cs b/src/WixToolset.Data/Tuples/TargetImagesTuple.cs new file mode 100644 index 00000000..0cb74ec9 --- /dev/null +++ b/src/WixToolset.Data/Tuples/TargetImagesTuple.cs @@ -0,0 +1,92 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition TargetImages = new IntermediateTupleDefinition( + TupleDefinitionType.TargetImages, + new[] + { + new IntermediateFieldDefinition(nameof(TargetImagesTupleFields.Target), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(TargetImagesTupleFields.MsiPath), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(TargetImagesTupleFields.SymbolPaths), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(TargetImagesTupleFields.Upgraded), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(TargetImagesTupleFields.Order), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(TargetImagesTupleFields.ProductValidateFlags), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(TargetImagesTupleFields.IgnoreMissingSrcFiles), IntermediateFieldType.Number), + }, + typeof(TargetImagesTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum TargetImagesTupleFields + { + Target, + MsiPath, + SymbolPaths, + Upgraded, + Order, + ProductValidateFlags, + IgnoreMissingSrcFiles, + } + + public class TargetImagesTuple : IntermediateTuple + { + public TargetImagesTuple() : base(TupleDefinitions.TargetImages, null, null) + { + } + + public TargetImagesTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.TargetImages, sourceLineNumber, id) + { + } + + public IntermediateField this[TargetImagesTupleFields index] => this.Fields[(int)index]; + + public string Target + { + get => (string)this.Fields[(int)TargetImagesTupleFields.Target]?.Value; + set => this.Set((int)TargetImagesTupleFields.Target, value); + } + + public string MsiPath + { + get => (string)this.Fields[(int)TargetImagesTupleFields.MsiPath]?.Value; + set => this.Set((int)TargetImagesTupleFields.MsiPath, value); + } + + public string SymbolPaths + { + get => (string)this.Fields[(int)TargetImagesTupleFields.SymbolPaths]?.Value; + set => this.Set((int)TargetImagesTupleFields.SymbolPaths, value); + } + + public string Upgraded + { + get => (string)this.Fields[(int)TargetImagesTupleFields.Upgraded]?.Value; + set => this.Set((int)TargetImagesTupleFields.Upgraded, value); + } + + public int Order + { + get => (int)this.Fields[(int)TargetImagesTupleFields.Order]?.Value; + set => this.Set((int)TargetImagesTupleFields.Order, value); + } + + public string ProductValidateFlags + { + get => (string)this.Fields[(int)TargetImagesTupleFields.ProductValidateFlags]?.Value; + set => this.Set((int)TargetImagesTupleFields.ProductValidateFlags, value); + } + + public int IgnoreMissingSrcFiles + { + get => (int)this.Fields[(int)TargetImagesTupleFields.IgnoreMissingSrcFiles]?.Value; + set => this.Set((int)TargetImagesTupleFields.IgnoreMissingSrcFiles, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/TextStyleTuple.cs b/src/WixToolset.Data/Tuples/TextStyleTuple.cs new file mode 100644 index 00000000..20ec878a --- /dev/null +++ b/src/WixToolset.Data/Tuples/TextStyleTuple.cs @@ -0,0 +1,76 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition TextStyle = new IntermediateTupleDefinition( + TupleDefinitionType.TextStyle, + new[] + { + new IntermediateFieldDefinition(nameof(TextStyleTupleFields.TextStyle), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(TextStyleTupleFields.FaceName), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(TextStyleTupleFields.Size), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(TextStyleTupleFields.Color), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(TextStyleTupleFields.StyleBits), IntermediateFieldType.Number), + }, + typeof(TextStyleTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum TextStyleTupleFields + { + TextStyle, + FaceName, + Size, + Color, + StyleBits, + } + + public class TextStyleTuple : IntermediateTuple + { + public TextStyleTuple() : base(TupleDefinitions.TextStyle, null, null) + { + } + + public TextStyleTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.TextStyle, sourceLineNumber, id) + { + } + + public IntermediateField this[TextStyleTupleFields index] => this.Fields[(int)index]; + + public string TextStyle + { + get => (string)this.Fields[(int)TextStyleTupleFields.TextStyle]?.Value; + set => this.Set((int)TextStyleTupleFields.TextStyle, value); + } + + public string FaceName + { + get => (string)this.Fields[(int)TextStyleTupleFields.FaceName]?.Value; + set => this.Set((int)TextStyleTupleFields.FaceName, value); + } + + public int Size + { + get => (int)this.Fields[(int)TextStyleTupleFields.Size]?.Value; + set => this.Set((int)TextStyleTupleFields.Size, value); + } + + public int Color + { + get => (int)this.Fields[(int)TextStyleTupleFields.Color]?.Value; + set => this.Set((int)TextStyleTupleFields.Color, value); + } + + public int StyleBits + { + get => (int)this.Fields[(int)TextStyleTupleFields.StyleBits]?.Value; + set => this.Set((int)TextStyleTupleFields.StyleBits, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/TupleDefinitions.cs b/src/WixToolset.Data/Tuples/TupleDefinitions.cs new file mode 100644 index 00000000..b9ab2042 --- /dev/null +++ b/src/WixToolset.Data/Tuples/TupleDefinitions.cs @@ -0,0 +1,815 @@ +// Copyright (c) .NET 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.Data +{ + using System; + + public enum TupleDefinitionType + { + _Streams, + _SummaryInformation, + _TransformView, + _Validation, + ActionText, + AdminExecuteSequence, + AdminUISequence, + AdvtExecuteSequence, + AppId, + AppSearch, + BBControl, + Billboard, + Binary, + BindImage, + CCPSearch, + CheckBox, + Class, + ComboBox, + CompLocator, + Complus, + Component, + Condition, + Control, + ControlCondition, + ControlEvent, + CreateFolder, + CustomAction, + Dialog, + Directory, + DrLocator, + DuplicateFile, + Environment, + Error, + EventMapping, + Extension, + ExternalFiles, + FamilyFileRanges, + Feature, + FeatureComponents, + File, + FileSFPCatalog, + Font, + Icon, + ImageFamilies, + IniFile, + IniLocator, + InstallExecuteSequence, + InstallUISequence, + IsolatedComponent, + LaunchCondition, + ListBox, + ListView, + LockPermissions, + Media, + MIME, + ModuleAdminExecuteSequence, + ModuleAdminUISequence, + ModuleAdvtExecuteSequence, + ModuleComponents, + ModuleConfiguration, + ModuleDependency, + ModuleExclusion, + ModuleIgnoreTable, + ModuleInstallExecuteSequence, + ModuleInstallUISequence, + ModuleSignature, + ModuleSubstitution, + MoveFile, + MsiAssembly, + MsiAssemblyName, + MsiDigitalCertificate, + MsiDigitalSignature, + MsiEmbeddedChainer, + MsiEmbeddedUI, + MsiFileHash, + MsiLockPermissionsEx, + MsiPackageCertificate, + MsiPatchCertificate, + MsiPatchHeaders, + MsiPatchMetadata, + MsiPatchOldAssemblyFile, + MsiPatchOldAssemblyName, + MsiPatchSequence, + MsiServiceConfig, + MsiServiceConfigFailureActions, + MsiShortcutProperty, + ODBCAttribute, + ODBCDataSource, + ODBCDriver, + ODBCSourceAttribute, + ODBCTranslator, + Patch, + PatchMetadata, + PatchPackage, + PatchSequence, + ProgId, + Properties, + Property, + PublishComponent, + RadioButton, + Registry, + RegLocator, + RemoveFile, + RemoveIniFile, + RemoveRegistry, + ReserveCost, + SelfReg, + ServiceControl, + ServiceInstall, + SFPCatalog, + Shortcut, + Signature, + TargetFiles_OptionalData, + TargetImages, + TextStyle, + TypeLib, + UIText, + Upgrade, + UpgradedFiles_OptionalData, + UpgradedFilesToIgnore, + UpgradedImages, + Verb, + WixAction, + WixApprovedExeForElevation, + WixBBControl, + WixBindUpdatedFiles, + WixBootstrapperApplication, + WixBuildInfo, + WixBundle, + WixBundleCatalog, + WixBundleContainer, + WixBundleExePackage, + WixBundleMsiFeature, + WixBundleMsiPackage, + WixBundleMsiProperty, + WixBundleMspPackage, + WixBundleMsuPackage, + WixBundlePackage, + WixBundlePackageCommandLine, + WixBundlePackageExitCode, + WixBundlePackageGroup, + WixBundlePatchTargetCode, + WixBundlePayload, + WixBundlePayloadGroup, + WixBundleProperties, + WixBundleRelatedPackage, + WixBundleRollbackBoundary, + WixBundleSlipstreamMsp, + WixBundleUpdate, + WixBundleVariable, + WixChain, + WixChainItem, + WixComplexReference, + WixComponentGroup, + WixComponentSearch, + WixControl, + WixCustomRow, + WixCustomTable, + WixDeltaPatchFile, + WixDeltaPatchSymbolPaths, + WixDirectory, + WixEnsureTable, + WixFeatureGroup, + WixFeatureModules, + WixFile, + WixFileSearch, + WixFragment, + WixGroup, + WixInstanceComponent, + WixInstanceTransforms, + WixMedia, + WixMediaTemplate, + WixMerge, + WixOrdering, + WixPackageFeatureInfo, + WixPackageProperties, + WixPatchBaseline, + WixPatchFamilyGroup, + WixPatchId, + WixPatchMetadata, + WixPatchRef, + WixPatchTarget, + WixPayloadProperties, + WixProductSearch, + WixProperty, + WixRegistrySearch, + WixRelatedBundle, + WixSearch, + WixSearchRelation, + WixSimpleReference, + WixSuppressAction, + WixSuppressModularization, + WixUI, + WixUpdateRegistration, + WixVariable, + MustBeFromAnExtension, + } + + public static partial class TupleDefinitions + { + public static readonly Version Version = new Version("4.0.0"); + + public static IntermediateTupleDefinition ByName(string name) + { + if (!Enum.TryParse(name, out TupleDefinitionType type) || type == TupleDefinitionType.MustBeFromAnExtension) + { + return null; + } + + return ByType(type); + } + + public static IntermediateTupleDefinition ByType(TupleDefinitionType type) + { + switch (type) + { + case TupleDefinitionType._Streams: + return TupleDefinitions._Streams; + + case TupleDefinitionType._SummaryInformation: + return TupleDefinitions._SummaryInformation; + + case TupleDefinitionType._TransformView: + return TupleDefinitions._TransformView; + + case TupleDefinitionType._Validation: + return TupleDefinitions._Validation; + + case TupleDefinitionType.ActionText: + return TupleDefinitions.ActionText; + + case TupleDefinitionType.AdminExecuteSequence: + return TupleDefinitions.AdminExecuteSequence; + + case TupleDefinitionType.AdminUISequence: + return TupleDefinitions.AdminUISequence; + + case TupleDefinitionType.AdvtExecuteSequence: + return TupleDefinitions.AdvtExecuteSequence; + + case TupleDefinitionType.AppId: + return TupleDefinitions.AppId; + + case TupleDefinitionType.AppSearch: + return TupleDefinitions.AppSearch; + + case TupleDefinitionType.BBControl: + return TupleDefinitions.BBControl; + + case TupleDefinitionType.Billboard: + return TupleDefinitions.Billboard; + + case TupleDefinitionType.Binary: + return TupleDefinitions.Binary; + + case TupleDefinitionType.BindImage: + return TupleDefinitions.BindImage; + + case TupleDefinitionType.CCPSearch: + return TupleDefinitions.CCPSearch; + + case TupleDefinitionType.CheckBox: + return TupleDefinitions.CheckBox; + + case TupleDefinitionType.Class: + return TupleDefinitions.Class; + + case TupleDefinitionType.ComboBox: + return TupleDefinitions.ComboBox; + + case TupleDefinitionType.CompLocator: + return TupleDefinitions.CompLocator; + + case TupleDefinitionType.Complus: + return TupleDefinitions.Complus; + + case TupleDefinitionType.Component: + return TupleDefinitions.Component; + + case TupleDefinitionType.Condition: + return TupleDefinitions.Condition; + + case TupleDefinitionType.Control: + return TupleDefinitions.Control; + + case TupleDefinitionType.ControlCondition: + return TupleDefinitions.ControlCondition; + + case TupleDefinitionType.ControlEvent: + return TupleDefinitions.ControlEvent; + + case TupleDefinitionType.CreateFolder: + return TupleDefinitions.CreateFolder; + + case TupleDefinitionType.CustomAction: + return TupleDefinitions.CustomAction; + + case TupleDefinitionType.Dialog: + return TupleDefinitions.Dialog; + + case TupleDefinitionType.Directory: + return TupleDefinitions.Directory; + + case TupleDefinitionType.DrLocator: + return TupleDefinitions.DrLocator; + + case TupleDefinitionType.DuplicateFile: + return TupleDefinitions.DuplicateFile; + + case TupleDefinitionType.Environment: + return TupleDefinitions.Environment; + + case TupleDefinitionType.Error: + return TupleDefinitions.Error; + + case TupleDefinitionType.EventMapping: + return TupleDefinitions.EventMapping; + + case TupleDefinitionType.Extension: + return TupleDefinitions.Extension; + + case TupleDefinitionType.ExternalFiles: + return TupleDefinitions.ExternalFiles; + + case TupleDefinitionType.FamilyFileRanges: + return TupleDefinitions.FamilyFileRanges; + + case TupleDefinitionType.Feature: + return TupleDefinitions.Feature; + + case TupleDefinitionType.FeatureComponents: + return TupleDefinitions.FeatureComponents; + + case TupleDefinitionType.File: + return TupleDefinitions.File; + + case TupleDefinitionType.FileSFPCatalog: + return TupleDefinitions.FileSFPCatalog; + + case TupleDefinitionType.Font: + return TupleDefinitions.Font; + + case TupleDefinitionType.Icon: + return TupleDefinitions.Icon; + + case TupleDefinitionType.ImageFamilies: + return TupleDefinitions.ImageFamilies; + + case TupleDefinitionType.IniFile: + return TupleDefinitions.IniFile; + + case TupleDefinitionType.IniLocator: + return TupleDefinitions.IniLocator; + + case TupleDefinitionType.InstallExecuteSequence: + return TupleDefinitions.InstallExecuteSequence; + + case TupleDefinitionType.InstallUISequence: + return TupleDefinitions.InstallUISequence; + + case TupleDefinitionType.IsolatedComponent: + return TupleDefinitions.IsolatedComponent; + + case TupleDefinitionType.LaunchCondition: + return TupleDefinitions.LaunchCondition; + + case TupleDefinitionType.ListBox: + return TupleDefinitions.ListBox; + + case TupleDefinitionType.ListView: + return TupleDefinitions.ListView; + + case TupleDefinitionType.LockPermissions: + return TupleDefinitions.LockPermissions; + + case TupleDefinitionType.Media: + return TupleDefinitions.Media; + + case TupleDefinitionType.MIME: + return TupleDefinitions.MIME; + + case TupleDefinitionType.ModuleAdminExecuteSequence: + return TupleDefinitions.ModuleAdminExecuteSequence; + + case TupleDefinitionType.ModuleAdminUISequence: + return TupleDefinitions.ModuleAdminUISequence; + + case TupleDefinitionType.ModuleAdvtExecuteSequence: + return TupleDefinitions.ModuleAdvtExecuteSequence; + + case TupleDefinitionType.ModuleComponents: + return TupleDefinitions.ModuleComponents; + + case TupleDefinitionType.ModuleConfiguration: + return TupleDefinitions.ModuleConfiguration; + + case TupleDefinitionType.ModuleDependency: + return TupleDefinitions.ModuleDependency; + + case TupleDefinitionType.ModuleExclusion: + return TupleDefinitions.ModuleExclusion; + + case TupleDefinitionType.ModuleIgnoreTable: + return TupleDefinitions.ModuleIgnoreTable; + + case TupleDefinitionType.ModuleInstallExecuteSequence: + return TupleDefinitions.ModuleInstallExecuteSequence; + + case TupleDefinitionType.ModuleInstallUISequence: + return TupleDefinitions.ModuleInstallUISequence; + + case TupleDefinitionType.ModuleSignature: + return TupleDefinitions.ModuleSignature; + + case TupleDefinitionType.ModuleSubstitution: + return TupleDefinitions.ModuleSubstitution; + + case TupleDefinitionType.MoveFile: + return TupleDefinitions.MoveFile; + + case TupleDefinitionType.MsiAssembly: + return TupleDefinitions.MsiAssembly; + + case TupleDefinitionType.MsiAssemblyName: + return TupleDefinitions.MsiAssemblyName; + + case TupleDefinitionType.MsiDigitalCertificate: + return TupleDefinitions.MsiDigitalCertificate; + + case TupleDefinitionType.MsiDigitalSignature: + return TupleDefinitions.MsiDigitalSignature; + + case TupleDefinitionType.MsiEmbeddedChainer: + return TupleDefinitions.MsiEmbeddedChainer; + + case TupleDefinitionType.MsiEmbeddedUI: + return TupleDefinitions.MsiEmbeddedUI; + + case TupleDefinitionType.MsiFileHash: + return TupleDefinitions.MsiFileHash; + + case TupleDefinitionType.MsiLockPermissionsEx: + return TupleDefinitions.MsiLockPermissionsEx; + + case TupleDefinitionType.MsiPackageCertificate: + return TupleDefinitions.MsiPackageCertificate; + + case TupleDefinitionType.MsiPatchCertificate: + return TupleDefinitions.MsiPatchCertificate; + + case TupleDefinitionType.MsiPatchHeaders: + return TupleDefinitions.MsiPatchHeaders; + + case TupleDefinitionType.MsiPatchMetadata: + return TupleDefinitions.MsiPatchMetadata; + + case TupleDefinitionType.MsiPatchOldAssemblyFile: + return TupleDefinitions.MsiPatchOldAssemblyFile; + + case TupleDefinitionType.MsiPatchOldAssemblyName: + return TupleDefinitions.MsiPatchOldAssemblyName; + + case TupleDefinitionType.MsiPatchSequence: + return TupleDefinitions.MsiPatchSequence; + + case TupleDefinitionType.MsiServiceConfig: + return TupleDefinitions.MsiServiceConfig; + + case TupleDefinitionType.MsiServiceConfigFailureActions: + return TupleDefinitions.MsiServiceConfigFailureActions; + + case TupleDefinitionType.MsiShortcutProperty: + return TupleDefinitions.MsiShortcutProperty; + + case TupleDefinitionType.ODBCAttribute: + return TupleDefinitions.ODBCAttribute; + + case TupleDefinitionType.ODBCDataSource: + return TupleDefinitions.ODBCDataSource; + + case TupleDefinitionType.ODBCDriver: + return TupleDefinitions.ODBCDriver; + + case TupleDefinitionType.ODBCSourceAttribute: + return TupleDefinitions.ODBCSourceAttribute; + + case TupleDefinitionType.ODBCTranslator: + return TupleDefinitions.ODBCTranslator; + + case TupleDefinitionType.Patch: + return TupleDefinitions.Patch; + + case TupleDefinitionType.PatchMetadata: + return TupleDefinitions.PatchMetadata; + + case TupleDefinitionType.PatchPackage: + return TupleDefinitions.PatchPackage; + + case TupleDefinitionType.PatchSequence: + return TupleDefinitions.PatchSequence; + + case TupleDefinitionType.ProgId: + return TupleDefinitions.ProgId; + + case TupleDefinitionType.Properties: + return TupleDefinitions.Properties; + + case TupleDefinitionType.Property: + return TupleDefinitions.Property; + + case TupleDefinitionType.PublishComponent: + return TupleDefinitions.PublishComponent; + + case TupleDefinitionType.RadioButton: + return TupleDefinitions.RadioButton; + + case TupleDefinitionType.Registry: + return TupleDefinitions.Registry; + + case TupleDefinitionType.RegLocator: + return TupleDefinitions.RegLocator; + + case TupleDefinitionType.RemoveFile: + return TupleDefinitions.RemoveFile; + + case TupleDefinitionType.RemoveIniFile: + return TupleDefinitions.RemoveIniFile; + + case TupleDefinitionType.RemoveRegistry: + return TupleDefinitions.RemoveRegistry; + + case TupleDefinitionType.ReserveCost: + return TupleDefinitions.ReserveCost; + + case TupleDefinitionType.SelfReg: + return TupleDefinitions.SelfReg; + + case TupleDefinitionType.ServiceControl: + return TupleDefinitions.ServiceControl; + + case TupleDefinitionType.ServiceInstall: + return TupleDefinitions.ServiceInstall; + + case TupleDefinitionType.SFPCatalog: + return TupleDefinitions.SFPCatalog; + + case TupleDefinitionType.Shortcut: + return TupleDefinitions.Shortcut; + + case TupleDefinitionType.Signature: + return TupleDefinitions.Signature; + + case TupleDefinitionType.TargetFiles_OptionalData: + return TupleDefinitions.TargetFiles_OptionalData; + + case TupleDefinitionType.TargetImages: + return TupleDefinitions.TargetImages; + + case TupleDefinitionType.TextStyle: + return TupleDefinitions.TextStyle; + + case TupleDefinitionType.TypeLib: + return TupleDefinitions.TypeLib; + + case TupleDefinitionType.UIText: + return TupleDefinitions.UIText; + + case TupleDefinitionType.Upgrade: + return TupleDefinitions.Upgrade; + + case TupleDefinitionType.UpgradedFiles_OptionalData: + return TupleDefinitions.UpgradedFiles_OptionalData; + + case TupleDefinitionType.UpgradedFilesToIgnore: + return TupleDefinitions.UpgradedFilesToIgnore; + + case TupleDefinitionType.UpgradedImages: + return TupleDefinitions.UpgradedImages; + + case TupleDefinitionType.Verb: + return TupleDefinitions.Verb; + + case TupleDefinitionType.WixAction: + return TupleDefinitions.WixAction; + + case TupleDefinitionType.WixApprovedExeForElevation: + return TupleDefinitions.WixApprovedExeForElevation; + + case TupleDefinitionType.WixBBControl: + return TupleDefinitions.WixBBControl; + + case TupleDefinitionType.WixBindUpdatedFiles: + return TupleDefinitions.WixBindUpdatedFiles; + + case TupleDefinitionType.WixBootstrapperApplication: + return TupleDefinitions.WixBootstrapperApplication; + + case TupleDefinitionType.WixBuildInfo: + return TupleDefinitions.WixBuildInfo; + + case TupleDefinitionType.WixBundle: + return TupleDefinitions.WixBundle; + + case TupleDefinitionType.WixBundleCatalog: + return TupleDefinitions.WixBundleCatalog; + + case TupleDefinitionType.WixBundleContainer: + return TupleDefinitions.WixBundleContainer; + + case TupleDefinitionType.WixBundleExePackage: + return TupleDefinitions.WixBundleExePackage; + + case TupleDefinitionType.WixBundleMsiFeature: + return TupleDefinitions.WixBundleMsiFeature; + + case TupleDefinitionType.WixBundleMsiPackage: + return TupleDefinitions.WixBundleMsiPackage; + + case TupleDefinitionType.WixBundleMsiProperty: + return TupleDefinitions.WixBundleMsiProperty; + + case TupleDefinitionType.WixBundleMspPackage: + return TupleDefinitions.WixBundleMspPackage; + + case TupleDefinitionType.WixBundleMsuPackage: + return TupleDefinitions.WixBundleMsuPackage; + + case TupleDefinitionType.WixBundlePackage: + return TupleDefinitions.WixBundlePackage; + + case TupleDefinitionType.WixBundlePackageCommandLine: + return TupleDefinitions.WixBundlePackageCommandLine; + + case TupleDefinitionType.WixBundlePackageExitCode: + return TupleDefinitions.WixBundlePackageExitCode; + + case TupleDefinitionType.WixBundlePackageGroup: + return TupleDefinitions.WixBundlePackageGroup; + + case TupleDefinitionType.WixBundlePatchTargetCode: + return TupleDefinitions.WixBundlePatchTargetCode; + + case TupleDefinitionType.WixBundlePayload: + return TupleDefinitions.WixBundlePayload; + + case TupleDefinitionType.WixBundlePayloadGroup: + return TupleDefinitions.WixBundlePayloadGroup; + + case TupleDefinitionType.WixBundleProperties: + return TupleDefinitions.WixBundleProperties; + + case TupleDefinitionType.WixBundleRelatedPackage: + return TupleDefinitions.WixBundleRelatedPackage; + + case TupleDefinitionType.WixBundleRollbackBoundary: + return TupleDefinitions.WixBundleRollbackBoundary; + + case TupleDefinitionType.WixBundleSlipstreamMsp: + return TupleDefinitions.WixBundleSlipstreamMsp; + + case TupleDefinitionType.WixBundleUpdate: + return TupleDefinitions.WixBundleUpdate; + + case TupleDefinitionType.WixBundleVariable: + return TupleDefinitions.WixBundleVariable; + + case TupleDefinitionType.WixChain: + return TupleDefinitions.WixChain; + + case TupleDefinitionType.WixChainItem: + return TupleDefinitions.WixChainItem; + + case TupleDefinitionType.WixComplexReference: + return TupleDefinitions.WixComplexReference; + + case TupleDefinitionType.WixComponentGroup: + return TupleDefinitions.WixComponentGroup; + + case TupleDefinitionType.WixComponentSearch: + return TupleDefinitions.WixComponentSearch; + + case TupleDefinitionType.WixControl: + return TupleDefinitions.WixControl; + + case TupleDefinitionType.WixCustomRow: + return TupleDefinitions.WixCustomRow; + + case TupleDefinitionType.WixCustomTable: + return TupleDefinitions.WixCustomTable; + + case TupleDefinitionType.WixDeltaPatchFile: + return TupleDefinitions.WixDeltaPatchFile; + + case TupleDefinitionType.WixDeltaPatchSymbolPaths: + return TupleDefinitions.WixDeltaPatchSymbolPaths; + + case TupleDefinitionType.WixDirectory: + return TupleDefinitions.WixDirectory; + + case TupleDefinitionType.WixEnsureTable: + return TupleDefinitions.WixEnsureTable; + + case TupleDefinitionType.WixFeatureGroup: + return TupleDefinitions.WixFeatureGroup; + + case TupleDefinitionType.WixFeatureModules: + return TupleDefinitions.WixFeatureModules; + + case TupleDefinitionType.WixFile: + return TupleDefinitions.WixFile; + + case TupleDefinitionType.WixFileSearch: + return TupleDefinitions.WixFileSearch; + + case TupleDefinitionType.WixFragment: + return TupleDefinitions.WixFragment; + + case TupleDefinitionType.WixGroup: + return TupleDefinitions.WixGroup; + + case TupleDefinitionType.WixInstanceComponent: + return TupleDefinitions.WixInstanceComponent; + + case TupleDefinitionType.WixInstanceTransforms: + return TupleDefinitions.WixInstanceTransforms; + + case TupleDefinitionType.WixMedia: + return TupleDefinitions.WixMedia; + + case TupleDefinitionType.WixMediaTemplate: + return TupleDefinitions.WixMediaTemplate; + + case TupleDefinitionType.WixMerge: + return TupleDefinitions.WixMerge; + + case TupleDefinitionType.WixOrdering: + return TupleDefinitions.WixOrdering; + + case TupleDefinitionType.WixPackageFeatureInfo: + return TupleDefinitions.WixPackageFeatureInfo; + + case TupleDefinitionType.WixPackageProperties: + return TupleDefinitions.WixPackageProperties; + + case TupleDefinitionType.WixPatchBaseline: + return TupleDefinitions.WixPatchBaseline; + + case TupleDefinitionType.WixPatchFamilyGroup: + return TupleDefinitions.WixPatchFamilyGroup; + + case TupleDefinitionType.WixPatchId: + return TupleDefinitions.WixPatchId; + + case TupleDefinitionType.WixPatchMetadata: + return TupleDefinitions.WixPatchMetadata; + + case TupleDefinitionType.WixPatchRef: + return TupleDefinitions.WixPatchRef; + + case TupleDefinitionType.WixPatchTarget: + return TupleDefinitions.WixPatchTarget; + + case TupleDefinitionType.WixPayloadProperties: + return TupleDefinitions.WixPayloadProperties; + + case TupleDefinitionType.WixProductSearch: + return TupleDefinitions.WixProductSearch; + + case TupleDefinitionType.WixProperty: + return TupleDefinitions.WixProperty; + + case TupleDefinitionType.WixRegistrySearch: + return TupleDefinitions.WixRegistrySearch; + + case TupleDefinitionType.WixRelatedBundle: + return TupleDefinitions.WixRelatedBundle; + + case TupleDefinitionType.WixSearch: + return TupleDefinitions.WixSearch; + + case TupleDefinitionType.WixSearchRelation: + return TupleDefinitions.WixSearchRelation; + + case TupleDefinitionType.WixSimpleReference: + return TupleDefinitions.WixSimpleReference; + + case TupleDefinitionType.WixSuppressAction: + return TupleDefinitions.WixSuppressAction; + + case TupleDefinitionType.WixSuppressModularization: + return TupleDefinitions.WixSuppressModularization; + + case TupleDefinitionType.WixUI: + return TupleDefinitions.WixUI; + + case TupleDefinitionType.WixUpdateRegistration: + return TupleDefinitions.WixUpdateRegistration; + + case TupleDefinitionType.WixVariable: + return TupleDefinitions.WixVariable; + + default: + throw new ArgumentOutOfRangeException(nameof(type)); + } + } + } +} diff --git a/src/WixToolset.Data/Tuples/TypeLibTuple.cs b/src/WixToolset.Data/Tuples/TypeLibTuple.cs new file mode 100644 index 00000000..7bd26bf3 --- /dev/null +++ b/src/WixToolset.Data/Tuples/TypeLibTuple.cs @@ -0,0 +1,100 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition TypeLib = new IntermediateTupleDefinition( + TupleDefinitionType.TypeLib, + new[] + { + new IntermediateFieldDefinition(nameof(TypeLibTupleFields.LibID), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(TypeLibTupleFields.Language), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(TypeLibTupleFields.Component_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(TypeLibTupleFields.Version), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(TypeLibTupleFields.Description), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(TypeLibTupleFields.Directory_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(TypeLibTupleFields.Feature_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(TypeLibTupleFields.Cost), IntermediateFieldType.Number), + }, + typeof(TypeLibTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum TypeLibTupleFields + { + LibID, + Language, + Component_, + Version, + Description, + Directory_, + Feature_, + Cost, + } + + public class TypeLibTuple : IntermediateTuple + { + public TypeLibTuple() : base(TupleDefinitions.TypeLib, null, null) + { + } + + public TypeLibTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.TypeLib, sourceLineNumber, id) + { + } + + public IntermediateField this[TypeLibTupleFields index] => this.Fields[(int)index]; + + public string LibID + { + get => (string)this.Fields[(int)TypeLibTupleFields.LibID]?.Value; + set => this.Set((int)TypeLibTupleFields.LibID, value); + } + + public int Language + { + get => (int)this.Fields[(int)TypeLibTupleFields.Language]?.Value; + set => this.Set((int)TypeLibTupleFields.Language, value); + } + + public string Component_ + { + get => (string)this.Fields[(int)TypeLibTupleFields.Component_]?.Value; + set => this.Set((int)TypeLibTupleFields.Component_, value); + } + + public int Version + { + get => (int)this.Fields[(int)TypeLibTupleFields.Version]?.Value; + set => this.Set((int)TypeLibTupleFields.Version, value); + } + + public string Description + { + get => (string)this.Fields[(int)TypeLibTupleFields.Description]?.Value; + set => this.Set((int)TypeLibTupleFields.Description, value); + } + + public string Directory_ + { + get => (string)this.Fields[(int)TypeLibTupleFields.Directory_]?.Value; + set => this.Set((int)TypeLibTupleFields.Directory_, value); + } + + public string Feature_ + { + get => (string)this.Fields[(int)TypeLibTupleFields.Feature_]?.Value; + set => this.Set((int)TypeLibTupleFields.Feature_, value); + } + + public int Cost + { + get => (int)this.Fields[(int)TypeLibTupleFields.Cost]?.Value; + set => this.Set((int)TypeLibTupleFields.Cost, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/UITextTuple.cs b/src/WixToolset.Data/Tuples/UITextTuple.cs new file mode 100644 index 00000000..3d5f2933 --- /dev/null +++ b/src/WixToolset.Data/Tuples/UITextTuple.cs @@ -0,0 +1,52 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition UIText = new IntermediateTupleDefinition( + TupleDefinitionType.UIText, + new[] + { + new IntermediateFieldDefinition(nameof(UITextTupleFields.Key), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(UITextTupleFields.Text), IntermediateFieldType.String), + }, + typeof(UITextTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum UITextTupleFields + { + Key, + Text, + } + + public class UITextTuple : IntermediateTuple + { + public UITextTuple() : base(TupleDefinitions.UIText, null, null) + { + } + + public UITextTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.UIText, sourceLineNumber, id) + { + } + + public IntermediateField this[UITextTupleFields index] => this.Fields[(int)index]; + + public string Key + { + get => (string)this.Fields[(int)UITextTupleFields.Key]?.Value; + set => this.Set((int)UITextTupleFields.Key, value); + } + + public string Text + { + get => (string)this.Fields[(int)UITextTupleFields.Text]?.Value; + set => this.Set((int)UITextTupleFields.Text, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/UpgradeTuple.cs b/src/WixToolset.Data/Tuples/UpgradeTuple.cs new file mode 100644 index 00000000..94fe1231 --- /dev/null +++ b/src/WixToolset.Data/Tuples/UpgradeTuple.cs @@ -0,0 +1,92 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition Upgrade = new IntermediateTupleDefinition( + TupleDefinitionType.Upgrade, + new[] + { + new IntermediateFieldDefinition(nameof(UpgradeTupleFields.UpgradeCode), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(UpgradeTupleFields.VersionMin), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(UpgradeTupleFields.VersionMax), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(UpgradeTupleFields.Language), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(UpgradeTupleFields.Attributes), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(UpgradeTupleFields.Remove), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(UpgradeTupleFields.ActionProperty), IntermediateFieldType.String), + }, + typeof(UpgradeTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum UpgradeTupleFields + { + UpgradeCode, + VersionMin, + VersionMax, + Language, + Attributes, + Remove, + ActionProperty, + } + + public class UpgradeTuple : IntermediateTuple + { + public UpgradeTuple() : base(TupleDefinitions.Upgrade, null, null) + { + } + + public UpgradeTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.Upgrade, sourceLineNumber, id) + { + } + + public IntermediateField this[UpgradeTupleFields index] => this.Fields[(int)index]; + + public string UpgradeCode + { + get => (string)this.Fields[(int)UpgradeTupleFields.UpgradeCode]?.Value; + set => this.Set((int)UpgradeTupleFields.UpgradeCode, value); + } + + public string VersionMin + { + get => (string)this.Fields[(int)UpgradeTupleFields.VersionMin]?.Value; + set => this.Set((int)UpgradeTupleFields.VersionMin, value); + } + + public string VersionMax + { + get => (string)this.Fields[(int)UpgradeTupleFields.VersionMax]?.Value; + set => this.Set((int)UpgradeTupleFields.VersionMax, value); + } + + public string Language + { + get => (string)this.Fields[(int)UpgradeTupleFields.Language]?.Value; + set => this.Set((int)UpgradeTupleFields.Language, value); + } + + public int Attributes + { + get => (int)this.Fields[(int)UpgradeTupleFields.Attributes]?.Value; + set => this.Set((int)UpgradeTupleFields.Attributes, value); + } + + public string Remove + { + get => (string)this.Fields[(int)UpgradeTupleFields.Remove]?.Value; + set => this.Set((int)UpgradeTupleFields.Remove, value); + } + + public string ActionProperty + { + get => (string)this.Fields[(int)UpgradeTupleFields.ActionProperty]?.Value; + set => this.Set((int)UpgradeTupleFields.ActionProperty, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/UpgradedFilesToIgnoreTuple.cs b/src/WixToolset.Data/Tuples/UpgradedFilesToIgnoreTuple.cs new file mode 100644 index 00000000..64ec9229 --- /dev/null +++ b/src/WixToolset.Data/Tuples/UpgradedFilesToIgnoreTuple.cs @@ -0,0 +1,52 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition UpgradedFilesToIgnore = new IntermediateTupleDefinition( + TupleDefinitionType.UpgradedFilesToIgnore, + new[] + { + new IntermediateFieldDefinition(nameof(UpgradedFilesToIgnoreTupleFields.Upgraded), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(UpgradedFilesToIgnoreTupleFields.FTK), IntermediateFieldType.String), + }, + typeof(UpgradedFilesToIgnoreTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum UpgradedFilesToIgnoreTupleFields + { + Upgraded, + FTK, + } + + public class UpgradedFilesToIgnoreTuple : IntermediateTuple + { + public UpgradedFilesToIgnoreTuple() : base(TupleDefinitions.UpgradedFilesToIgnore, null, null) + { + } + + public UpgradedFilesToIgnoreTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.UpgradedFilesToIgnore, sourceLineNumber, id) + { + } + + public IntermediateField this[UpgradedFilesToIgnoreTupleFields index] => this.Fields[(int)index]; + + public string Upgraded + { + get => (string)this.Fields[(int)UpgradedFilesToIgnoreTupleFields.Upgraded]?.Value; + set => this.Set((int)UpgradedFilesToIgnoreTupleFields.Upgraded, value); + } + + public string FTK + { + get => (string)this.Fields[(int)UpgradedFilesToIgnoreTupleFields.FTK]?.Value; + set => this.Set((int)UpgradedFilesToIgnoreTupleFields.FTK, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/UpgradedFiles_OptionalDataTuple.cs b/src/WixToolset.Data/Tuples/UpgradedFiles_OptionalDataTuple.cs new file mode 100644 index 00000000..09b93fed --- /dev/null +++ b/src/WixToolset.Data/Tuples/UpgradedFiles_OptionalDataTuple.cs @@ -0,0 +1,76 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition UpgradedFiles_OptionalData = new IntermediateTupleDefinition( + TupleDefinitionType.UpgradedFiles_OptionalData, + new[] + { + new IntermediateFieldDefinition(nameof(UpgradedFiles_OptionalDataTupleFields.Upgraded), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(UpgradedFiles_OptionalDataTupleFields.FTK), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(UpgradedFiles_OptionalDataTupleFields.SymbolPaths), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(UpgradedFiles_OptionalDataTupleFields.AllowIgnoreOnPatchError), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(UpgradedFiles_OptionalDataTupleFields.IncludeWholeFile), IntermediateFieldType.Number), + }, + typeof(UpgradedFiles_OptionalDataTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum UpgradedFiles_OptionalDataTupleFields + { + Upgraded, + FTK, + SymbolPaths, + AllowIgnoreOnPatchError, + IncludeWholeFile, + } + + public class UpgradedFiles_OptionalDataTuple : IntermediateTuple + { + public UpgradedFiles_OptionalDataTuple() : base(TupleDefinitions.UpgradedFiles_OptionalData, null, null) + { + } + + public UpgradedFiles_OptionalDataTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.UpgradedFiles_OptionalData, sourceLineNumber, id) + { + } + + public IntermediateField this[UpgradedFiles_OptionalDataTupleFields index] => this.Fields[(int)index]; + + public string Upgraded + { + get => (string)this.Fields[(int)UpgradedFiles_OptionalDataTupleFields.Upgraded]?.Value; + set => this.Set((int)UpgradedFiles_OptionalDataTupleFields.Upgraded, value); + } + + public string FTK + { + get => (string)this.Fields[(int)UpgradedFiles_OptionalDataTupleFields.FTK]?.Value; + set => this.Set((int)UpgradedFiles_OptionalDataTupleFields.FTK, value); + } + + public string SymbolPaths + { + get => (string)this.Fields[(int)UpgradedFiles_OptionalDataTupleFields.SymbolPaths]?.Value; + set => this.Set((int)UpgradedFiles_OptionalDataTupleFields.SymbolPaths, value); + } + + public int AllowIgnoreOnPatchError + { + get => (int)this.Fields[(int)UpgradedFiles_OptionalDataTupleFields.AllowIgnoreOnPatchError]?.Value; + set => this.Set((int)UpgradedFiles_OptionalDataTupleFields.AllowIgnoreOnPatchError, value); + } + + public int IncludeWholeFile + { + get => (int)this.Fields[(int)UpgradedFiles_OptionalDataTupleFields.IncludeWholeFile]?.Value; + set => this.Set((int)UpgradedFiles_OptionalDataTupleFields.IncludeWholeFile, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/UpgradedImagesTuple.cs b/src/WixToolset.Data/Tuples/UpgradedImagesTuple.cs new file mode 100644 index 00000000..32170467 --- /dev/null +++ b/src/WixToolset.Data/Tuples/UpgradedImagesTuple.cs @@ -0,0 +1,76 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition UpgradedImages = new IntermediateTupleDefinition( + TupleDefinitionType.UpgradedImages, + new[] + { + new IntermediateFieldDefinition(nameof(UpgradedImagesTupleFields.Upgraded), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(UpgradedImagesTupleFields.MsiPath), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(UpgradedImagesTupleFields.PatchMsiPath), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(UpgradedImagesTupleFields.SymbolPaths), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(UpgradedImagesTupleFields.Family), IntermediateFieldType.String), + }, + typeof(UpgradedImagesTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum UpgradedImagesTupleFields + { + Upgraded, + MsiPath, + PatchMsiPath, + SymbolPaths, + Family, + } + + public class UpgradedImagesTuple : IntermediateTuple + { + public UpgradedImagesTuple() : base(TupleDefinitions.UpgradedImages, null, null) + { + } + + public UpgradedImagesTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.UpgradedImages, sourceLineNumber, id) + { + } + + public IntermediateField this[UpgradedImagesTupleFields index] => this.Fields[(int)index]; + + public string Upgraded + { + get => (string)this.Fields[(int)UpgradedImagesTupleFields.Upgraded]?.Value; + set => this.Set((int)UpgradedImagesTupleFields.Upgraded, value); + } + + public string MsiPath + { + get => (string)this.Fields[(int)UpgradedImagesTupleFields.MsiPath]?.Value; + set => this.Set((int)UpgradedImagesTupleFields.MsiPath, value); + } + + public string PatchMsiPath + { + get => (string)this.Fields[(int)UpgradedImagesTupleFields.PatchMsiPath]?.Value; + set => this.Set((int)UpgradedImagesTupleFields.PatchMsiPath, value); + } + + public string SymbolPaths + { + get => (string)this.Fields[(int)UpgradedImagesTupleFields.SymbolPaths]?.Value; + set => this.Set((int)UpgradedImagesTupleFields.SymbolPaths, value); + } + + public string Family + { + get => (string)this.Fields[(int)UpgradedImagesTupleFields.Family]?.Value; + set => this.Set((int)UpgradedImagesTupleFields.Family, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/VerbTuple.cs b/src/WixToolset.Data/Tuples/VerbTuple.cs new file mode 100644 index 00000000..4d5c7c03 --- /dev/null +++ b/src/WixToolset.Data/Tuples/VerbTuple.cs @@ -0,0 +1,76 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition Verb = new IntermediateTupleDefinition( + TupleDefinitionType.Verb, + new[] + { + new IntermediateFieldDefinition(nameof(VerbTupleFields.Extension_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(VerbTupleFields.Verb), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(VerbTupleFields.Sequence), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(VerbTupleFields.Command), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(VerbTupleFields.Argument), IntermediateFieldType.String), + }, + typeof(VerbTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum VerbTupleFields + { + Extension_, + Verb, + Sequence, + Command, + Argument, + } + + public class VerbTuple : IntermediateTuple + { + public VerbTuple() : base(TupleDefinitions.Verb, null, null) + { + } + + public VerbTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.Verb, sourceLineNumber, id) + { + } + + public IntermediateField this[VerbTupleFields index] => this.Fields[(int)index]; + + public string Extension_ + { + get => (string)this.Fields[(int)VerbTupleFields.Extension_]?.Value; + set => this.Set((int)VerbTupleFields.Extension_, value); + } + + public string Verb + { + get => (string)this.Fields[(int)VerbTupleFields.Verb]?.Value; + set => this.Set((int)VerbTupleFields.Verb, value); + } + + public int Sequence + { + get => (int)this.Fields[(int)VerbTupleFields.Sequence]?.Value; + set => this.Set((int)VerbTupleFields.Sequence, value); + } + + public string Command + { + get => (string)this.Fields[(int)VerbTupleFields.Command]?.Value; + set => this.Set((int)VerbTupleFields.Command, value); + } + + public string Argument + { + get => (string)this.Fields[(int)VerbTupleFields.Argument]?.Value; + set => this.Set((int)VerbTupleFields.Argument, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/WixActionTuple.cs b/src/WixToolset.Data/Tuples/WixActionTuple.cs new file mode 100644 index 00000000..53ea52de --- /dev/null +++ b/src/WixToolset.Data/Tuples/WixActionTuple.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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition WixAction = new IntermediateTupleDefinition( + TupleDefinitionType.WixAction, + new[] + { + new IntermediateFieldDefinition(nameof(WixActionTupleFields.SequenceTable), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixActionTupleFields.Action), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixActionTupleFields.Condition), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixActionTupleFields.Sequence), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(WixActionTupleFields.Before), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixActionTupleFields.After), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixActionTupleFields.Overridable), IntermediateFieldType.Bool), + }, + typeof(WixActionTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + using System; + + public enum WixActionTupleFields + { + SequenceTable, + Action, + Condition, + Sequence, + Before, + After, + Overridable, + } + + public enum SequenceTable + { + AdminUISequence, + AdminExecuteSequence, + AdvtExecuteSequence, + InstallUISequence, + InstallExecuteSequence + } + + public class WixActionTuple : IntermediateTuple + { + public WixActionTuple() : base(TupleDefinitions.WixAction, null, null) + { + } + + public WixActionTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixAction, sourceLineNumber, id) + { + } + + public IntermediateField this[WixActionTupleFields index] => this.Fields[(int)index]; + + public SequenceTable SequenceTable + { + get => (SequenceTable)Enum.Parse(typeof(SequenceTable), (string)this.Fields[(int)WixActionTupleFields.SequenceTable]?.Value); + set => this.Set((int)WixActionTupleFields.SequenceTable, value.ToString()); + } + + public string Action + { + get => (string)this.Fields[(int)WixActionTupleFields.Action]?.Value; + set => this.Set((int)WixActionTupleFields.Action, value); + } + + public string Condition + { + get => (string)this.Fields[(int)WixActionTupleFields.Condition]?.Value; + set => this.Set((int)WixActionTupleFields.Condition, value); + } + + public int Sequence + { + get => (int)this.Fields[(int)WixActionTupleFields.Sequence]?.Value; + set => this.Set((int)WixActionTupleFields.Sequence, value); + } + + public string Before + { + get => (string)this.Fields[(int)WixActionTupleFields.Before]?.Value; + set => this.Set((int)WixActionTupleFields.Before, value); + } + + public string After + { + get => (string)this.Fields[(int)WixActionTupleFields.After]?.Value; + set => this.Set((int)WixActionTupleFields.After, value); + } + + public bool Overridable + { + get => (bool)this.Fields[(int)WixActionTupleFields.Overridable]?.Value; + set => this.Set((int)WixActionTupleFields.Overridable, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/WixApprovedExeForElevationTuple.cs b/src/WixToolset.Data/Tuples/WixApprovedExeForElevationTuple.cs new file mode 100644 index 00000000..e733e6ab --- /dev/null +++ b/src/WixToolset.Data/Tuples/WixApprovedExeForElevationTuple.cs @@ -0,0 +1,68 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition WixApprovedExeForElevation = new IntermediateTupleDefinition( + TupleDefinitionType.WixApprovedExeForElevation, + new[] + { + new IntermediateFieldDefinition(nameof(WixApprovedExeForElevationTupleFields.Id), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixApprovedExeForElevationTupleFields.Key), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixApprovedExeForElevationTupleFields.Value), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixApprovedExeForElevationTupleFields.Attributes), IntermediateFieldType.Number), + }, + typeof(WixApprovedExeForElevationTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum WixApprovedExeForElevationTupleFields + { + Id, + Key, + Value, + Attributes, + } + + public class WixApprovedExeForElevationTuple : IntermediateTuple + { + public WixApprovedExeForElevationTuple() : base(TupleDefinitions.WixApprovedExeForElevation, null, null) + { + } + + public WixApprovedExeForElevationTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixApprovedExeForElevation, sourceLineNumber, id) + { + } + + public IntermediateField this[WixApprovedExeForElevationTupleFields index] => this.Fields[(int)index]; + + public string Id + { + get => (string)this.Fields[(int)WixApprovedExeForElevationTupleFields.Id]?.Value; + set => this.Set((int)WixApprovedExeForElevationTupleFields.Id, value); + } + + public string Key + { + get => (string)this.Fields[(int)WixApprovedExeForElevationTupleFields.Key]?.Value; + set => this.Set((int)WixApprovedExeForElevationTupleFields.Key, value); + } + + public string Value + { + get => (string)this.Fields[(int)WixApprovedExeForElevationTupleFields.Value]?.Value; + set => this.Set((int)WixApprovedExeForElevationTupleFields.Value, value); + } + + public int Attributes + { + get => (int)this.Fields[(int)WixApprovedExeForElevationTupleFields.Attributes]?.Value; + set => this.Set((int)WixApprovedExeForElevationTupleFields.Attributes, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/WixBBControlTuple.cs b/src/WixToolset.Data/Tuples/WixBBControlTuple.cs new file mode 100644 index 00000000..4d912c38 --- /dev/null +++ b/src/WixToolset.Data/Tuples/WixBBControlTuple.cs @@ -0,0 +1,60 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition WixBBControl = new IntermediateTupleDefinition( + TupleDefinitionType.WixBBControl, + new[] + { + new IntermediateFieldDefinition(nameof(WixBBControlTupleFields.Billboard_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBBControlTupleFields.BBControl_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBBControlTupleFields.SourceFile), IntermediateFieldType.Path), + }, + typeof(WixBBControlTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum WixBBControlTupleFields + { + Billboard_, + BBControl_, + SourceFile, + } + + public class WixBBControlTuple : IntermediateTuple + { + public WixBBControlTuple() : base(TupleDefinitions.WixBBControl, null, null) + { + } + + public WixBBControlTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixBBControl, sourceLineNumber, id) + { + } + + public IntermediateField this[WixBBControlTupleFields index] => this.Fields[(int)index]; + + public string Billboard_ + { + get => (string)this.Fields[(int)WixBBControlTupleFields.Billboard_]?.Value; + set => this.Set((int)WixBBControlTupleFields.Billboard_, value); + } + + public string BBControl_ + { + get => (string)this.Fields[(int)WixBBControlTupleFields.BBControl_]?.Value; + set => this.Set((int)WixBBControlTupleFields.BBControl_, value); + } + + public string SourceFile + { + get => (string)this.Fields[(int)WixBBControlTupleFields.SourceFile]?.Value; + set => this.Set((int)WixBBControlTupleFields.SourceFile, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/WixBindUpdatedFilesTuple.cs b/src/WixToolset.Data/Tuples/WixBindUpdatedFilesTuple.cs new file mode 100644 index 00000000..16a2a972 --- /dev/null +++ b/src/WixToolset.Data/Tuples/WixBindUpdatedFilesTuple.cs @@ -0,0 +1,44 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition WixBindUpdatedFiles = new IntermediateTupleDefinition( + TupleDefinitionType.WixBindUpdatedFiles, + new[] + { + new IntermediateFieldDefinition(nameof(WixBindUpdatedFilesTupleFields.File_), IntermediateFieldType.String), + }, + typeof(WixBindUpdatedFilesTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum WixBindUpdatedFilesTupleFields + { + File_, + } + + public class WixBindUpdatedFilesTuple : IntermediateTuple + { + public WixBindUpdatedFilesTuple() : base(TupleDefinitions.WixBindUpdatedFiles, null, null) + { + } + + public WixBindUpdatedFilesTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixBindUpdatedFiles, sourceLineNumber, id) + { + } + + public IntermediateField this[WixBindUpdatedFilesTupleFields index] => this.Fields[(int)index]; + + public string File_ + { + get => (string)this.Fields[(int)WixBindUpdatedFilesTupleFields.File_]?.Value; + set => this.Set((int)WixBindUpdatedFilesTupleFields.File_, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/WixBootstrapperApplicationTuple.cs b/src/WixToolset.Data/Tuples/WixBootstrapperApplicationTuple.cs new file mode 100644 index 00000000..00bf9dae --- /dev/null +++ b/src/WixToolset.Data/Tuples/WixBootstrapperApplicationTuple.cs @@ -0,0 +1,44 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition WixBootstrapperApplication = new IntermediateTupleDefinition( + TupleDefinitionType.WixBootstrapperApplication, + new[] + { + new IntermediateFieldDefinition(nameof(WixBootstrapperApplicationTupleFields.Id), IntermediateFieldType.String), + }, + typeof(WixBootstrapperApplicationTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum WixBootstrapperApplicationTupleFields + { + Id, + } + + public class WixBootstrapperApplicationTuple : IntermediateTuple + { + public WixBootstrapperApplicationTuple() : base(TupleDefinitions.WixBootstrapperApplication, null, null) + { + } + + public WixBootstrapperApplicationTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixBootstrapperApplication, sourceLineNumber, id) + { + } + + public IntermediateField this[WixBootstrapperApplicationTupleFields index] => this.Fields[(int)index]; + + public string Id + { + get => (string)this.Fields[(int)WixBootstrapperApplicationTupleFields.Id]?.Value; + set => this.Set((int)WixBootstrapperApplicationTupleFields.Id, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/WixBuildInfoTuple.cs b/src/WixToolset.Data/Tuples/WixBuildInfoTuple.cs new file mode 100644 index 00000000..d71cbbaf --- /dev/null +++ b/src/WixToolset.Data/Tuples/WixBuildInfoTuple.cs @@ -0,0 +1,68 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition WixBuildInfo = new IntermediateTupleDefinition( + TupleDefinitionType.WixBuildInfo, + new[] + { + new IntermediateFieldDefinition(nameof(WixBuildInfoTupleFields.WixVersion), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBuildInfoTupleFields.WixOutputFile), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBuildInfoTupleFields.WixProjectFile), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBuildInfoTupleFields.WixPdbFile), IntermediateFieldType.String), + }, + typeof(WixBuildInfoTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum WixBuildInfoTupleFields + { + WixVersion, + WixOutputFile, + WixProjectFile, + WixPdbFile, + } + + public class WixBuildInfoTuple : IntermediateTuple + { + public WixBuildInfoTuple() : base(TupleDefinitions.WixBuildInfo, null, null) + { + } + + public WixBuildInfoTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixBuildInfo, sourceLineNumber, id) + { + } + + public IntermediateField this[WixBuildInfoTupleFields index] => this.Fields[(int)index]; + + public string WixVersion + { + get => (string)this.Fields[(int)WixBuildInfoTupleFields.WixVersion]?.Value; + set => this.Set((int)WixBuildInfoTupleFields.WixVersion, value); + } + + public string WixOutputFile + { + get => (string)this.Fields[(int)WixBuildInfoTupleFields.WixOutputFile]?.Value; + set => this.Set((int)WixBuildInfoTupleFields.WixOutputFile, value); + } + + public string WixProjectFile + { + get => (string)this.Fields[(int)WixBuildInfoTupleFields.WixProjectFile]?.Value; + set => this.Set((int)WixBuildInfoTupleFields.WixProjectFile, value); + } + + public string WixPdbFile + { + get => (string)this.Fields[(int)WixBuildInfoTupleFields.WixPdbFile]?.Value; + set => this.Set((int)WixBuildInfoTupleFields.WixPdbFile, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/WixBundleCatalogTuple.cs b/src/WixToolset.Data/Tuples/WixBundleCatalogTuple.cs new file mode 100644 index 00000000..4a4cd372 --- /dev/null +++ b/src/WixToolset.Data/Tuples/WixBundleCatalogTuple.cs @@ -0,0 +1,52 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition WixBundleCatalog = new IntermediateTupleDefinition( + TupleDefinitionType.WixBundleCatalog, + new[] + { + new IntermediateFieldDefinition(nameof(WixBundleCatalogTupleFields.WixBundleCatalog), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundleCatalogTupleFields.Payload_), IntermediateFieldType.String), + }, + typeof(WixBundleCatalogTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum WixBundleCatalogTupleFields + { + WixBundleCatalog, + Payload_, + } + + public class WixBundleCatalogTuple : IntermediateTuple + { + public WixBundleCatalogTuple() : base(TupleDefinitions.WixBundleCatalog, null, null) + { + } + + public WixBundleCatalogTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixBundleCatalog, sourceLineNumber, id) + { + } + + public IntermediateField this[WixBundleCatalogTupleFields index] => this.Fields[(int)index]; + + public string WixBundleCatalog + { + get => (string)this.Fields[(int)WixBundleCatalogTupleFields.WixBundleCatalog]?.Value; + set => this.Set((int)WixBundleCatalogTupleFields.WixBundleCatalog, value); + } + + public string Payload_ + { + get => (string)this.Fields[(int)WixBundleCatalogTupleFields.Payload_]?.Value; + set => this.Set((int)WixBundleCatalogTupleFields.Payload_, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/WixBundleContainerTuple.cs b/src/WixToolset.Data/Tuples/WixBundleContainerTuple.cs new file mode 100644 index 00000000..d06e029f --- /dev/null +++ b/src/WixToolset.Data/Tuples/WixBundleContainerTuple.cs @@ -0,0 +1,111 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition WixBundleContainer = new IntermediateTupleDefinition( + TupleDefinitionType.WixBundleContainer, + new[] + { + new IntermediateFieldDefinition(nameof(WixBundleContainerTupleFields.WixBundleContainer), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundleContainerTupleFields.Name), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundleContainerTupleFields.Type), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(WixBundleContainerTupleFields.DownloadUrl), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundleContainerTupleFields.Size), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(WixBundleContainerTupleFields.Hash), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundleContainerTupleFields.AttachedContainerIndex), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(WixBundleContainerTupleFields.WorkingPath), IntermediateFieldType.String), + }, + typeof(WixBundleContainerTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + using System; + + public enum WixBundleContainerTupleFields + { + WixBundleContainer, + Name, + Type, + DownloadUrl, + Size, + Hash, + AttachedContainerIndex, + WorkingPath, + } + + /// + /// Types of bundle packages. + /// + public enum ContainerType + { + Attached, + Detached, + } + + public class WixBundleContainerTuple : IntermediateTuple + { + public WixBundleContainerTuple() : base(TupleDefinitions.WixBundleContainer, null, null) + { + } + + public WixBundleContainerTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixBundleContainer, sourceLineNumber, id) + { + } + + public IntermediateField this[WixBundleContainerTupleFields index] => this.Fields[(int)index]; + + public string WixBundleContainer + { + get => (string)this.Fields[(int)WixBundleContainerTupleFields.WixBundleContainer]?.Value; + set => this.Set((int)WixBundleContainerTupleFields.WixBundleContainer, value); + } + + public string Name + { + get => (string)this.Fields[(int)WixBundleContainerTupleFields.Name]?.Value; + set => this.Set((int)WixBundleContainerTupleFields.Name, value); + } + + public ContainerType Type + { + get => (ContainerType)Enum.Parse(typeof(ContainerType), (string)this.Fields[(int)WixBundleContainerTupleFields.Type]?.Value, true); + set => this.Set((int)WixBundleContainerTupleFields.Type, value.ToString()); + } + + public string DownloadUrl + { + get => (string)this.Fields[(int)WixBundleContainerTupleFields.DownloadUrl]?.Value; + set => this.Set((int)WixBundleContainerTupleFields.DownloadUrl, value); + } + + public int Size + { + get => (int)this.Fields[(int)WixBundleContainerTupleFields.Size]?.Value; + set => this.Set((int)WixBundleContainerTupleFields.Size, value); + } + + public string Hash + { + get => (string)this.Fields[(int)WixBundleContainerTupleFields.Hash]?.Value; + set => this.Set((int)WixBundleContainerTupleFields.Hash, value); + } + + public int AttachedContainerIndex + { + get => (int)this.Fields[(int)WixBundleContainerTupleFields.AttachedContainerIndex]?.Value; + set => this.Set((int)WixBundleContainerTupleFields.AttachedContainerIndex, value); + } + + public string WorkingPath + { + get => (string)this.Fields[(int)WixBundleContainerTupleFields.WorkingPath]?.Value; + set => this.Set((int)WixBundleContainerTupleFields.WorkingPath, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/WixBundleExePackageTuple.cs b/src/WixToolset.Data/Tuples/WixBundleExePackageTuple.cs new file mode 100644 index 00000000..7ba036f3 --- /dev/null +++ b/src/WixToolset.Data/Tuples/WixBundleExePackageTuple.cs @@ -0,0 +1,100 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition WixBundleExePackage = new IntermediateTupleDefinition( + TupleDefinitionType.WixBundleExePackage, + new[] + { + new IntermediateFieldDefinition(nameof(WixBundleExePackageTupleFields.WixBundlePackage_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundleExePackageTupleFields.Attributes), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(WixBundleExePackageTupleFields.DetectCondition), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundleExePackageTupleFields.InstallCommand), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundleExePackageTupleFields.RepairCommand), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundleExePackageTupleFields.UninstallCommand), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundleExePackageTupleFields.ExeProtocol), IntermediateFieldType.String), + }, + typeof(WixBundleExePackageTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + using System; + + public enum WixBundleExePackageTupleFields + { + WixBundlePackage_, + Attributes, + DetectCondition, + InstallCommand, + RepairCommand, + UninstallCommand, + ExeProtocol, + } + + [Flags] + public enum WixBundleExePackageAttributes + { + Repairable = 0x1, + } + + public class WixBundleExePackageTuple : IntermediateTuple + { + public WixBundleExePackageTuple() : base(TupleDefinitions.WixBundleExePackage, null, null) + { + } + + public WixBundleExePackageTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixBundleExePackage, sourceLineNumber, id) + { + } + + public IntermediateField this[WixBundleExePackageTupleFields index] => this.Fields[(int)index]; + + public string WixBundlePackage_ + { + get => (string)this.Fields[(int)WixBundleExePackageTupleFields.WixBundlePackage_]?.Value; + set => this.Set((int)WixBundleExePackageTupleFields.WixBundlePackage_, value); + } + + public WixBundleExePackageAttributes Attributes + { + get => (WixBundleExePackageAttributes)(int)this.Fields[(int)WixBundleExePackageTupleFields.Attributes]?.Value; + set => this.Set((int)WixBundleExePackageTupleFields.Attributes, (int)value); + } + + public string DetectCondition + { + get => (string)this.Fields[(int)WixBundleExePackageTupleFields.DetectCondition]?.Value; + set => this.Set((int)WixBundleExePackageTupleFields.DetectCondition, value); + } + + public string InstallCommand + { + get => (string)this.Fields[(int)WixBundleExePackageTupleFields.InstallCommand]?.Value; + set => this.Set((int)WixBundleExePackageTupleFields.InstallCommand, value); + } + + public string RepairCommand + { + get => (string)this.Fields[(int)WixBundleExePackageTupleFields.RepairCommand]?.Value; + set => this.Set((int)WixBundleExePackageTupleFields.RepairCommand, value); + } + + public string UninstallCommand + { + get => (string)this.Fields[(int)WixBundleExePackageTupleFields.UninstallCommand]?.Value; + set => this.Set((int)WixBundleExePackageTupleFields.UninstallCommand, value); + } + + public string ExeProtocol + { + get => (string)this.Fields[(int)WixBundleExePackageTupleFields.ExeProtocol]?.Value; + set => this.Set((int)WixBundleExePackageTupleFields.ExeProtocol, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/WixBundleMsiFeatureTuple.cs b/src/WixToolset.Data/Tuples/WixBundleMsiFeatureTuple.cs new file mode 100644 index 00000000..2729205d --- /dev/null +++ b/src/WixToolset.Data/Tuples/WixBundleMsiFeatureTuple.cs @@ -0,0 +1,116 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition WixBundleMsiFeature = new IntermediateTupleDefinition( + TupleDefinitionType.WixBundleMsiFeature, + new[] + { + new IntermediateFieldDefinition(nameof(WixBundleMsiFeatureTupleFields.WixBundlePackage_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundleMsiFeatureTupleFields.Name), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundleMsiFeatureTupleFields.Size), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(WixBundleMsiFeatureTupleFields.Parent), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundleMsiFeatureTupleFields.Title), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundleMsiFeatureTupleFields.Description), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundleMsiFeatureTupleFields.Display), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(WixBundleMsiFeatureTupleFields.Level), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(WixBundleMsiFeatureTupleFields.Directory), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundleMsiFeatureTupleFields.Attributes), IntermediateFieldType.Number), + }, + typeof(WixBundleMsiFeatureTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum WixBundleMsiFeatureTupleFields + { + WixBundlePackage_, + Name, + Size, + Parent, + Title, + Description, + Display, + Level, + Directory, + Attributes, + } + + public class WixBundleMsiFeatureTuple : IntermediateTuple + { + public WixBundleMsiFeatureTuple() : base(TupleDefinitions.WixBundleMsiFeature, null, null) + { + } + + public WixBundleMsiFeatureTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixBundleMsiFeature, sourceLineNumber, id) + { + } + + public IntermediateField this[WixBundleMsiFeatureTupleFields index] => this.Fields[(int)index]; + + public string WixBundlePackage_ + { + get => (string)this.Fields[(int)WixBundleMsiFeatureTupleFields.WixBundlePackage_]?.Value; + set => this.Set((int)WixBundleMsiFeatureTupleFields.WixBundlePackage_, value); + } + + public string Name + { + get => (string)this.Fields[(int)WixBundleMsiFeatureTupleFields.Name]?.Value; + set => this.Set((int)WixBundleMsiFeatureTupleFields.Name, value); + } + + public int Size + { + get => (int)this.Fields[(int)WixBundleMsiFeatureTupleFields.Size]?.Value; + set => this.Set((int)WixBundleMsiFeatureTupleFields.Size, value); + } + + public string Parent + { + get => (string)this.Fields[(int)WixBundleMsiFeatureTupleFields.Parent]?.Value; + set => this.Set((int)WixBundleMsiFeatureTupleFields.Parent, value); + } + + public string Title + { + get => (string)this.Fields[(int)WixBundleMsiFeatureTupleFields.Title]?.Value; + set => this.Set((int)WixBundleMsiFeatureTupleFields.Title, value); + } + + public string Description + { + get => (string)this.Fields[(int)WixBundleMsiFeatureTupleFields.Description]?.Value; + set => this.Set((int)WixBundleMsiFeatureTupleFields.Description, value); + } + + public int Display + { + get => (int)this.Fields[(int)WixBundleMsiFeatureTupleFields.Display]?.Value; + set => this.Set((int)WixBundleMsiFeatureTupleFields.Display, value); + } + + public int Level + { + get => (int)this.Fields[(int)WixBundleMsiFeatureTupleFields.Level]?.Value; + set => this.Set((int)WixBundleMsiFeatureTupleFields.Level, value); + } + + public string Directory + { + get => (string)this.Fields[(int)WixBundleMsiFeatureTupleFields.Directory]?.Value; + set => this.Set((int)WixBundleMsiFeatureTupleFields.Directory, value); + } + + public int Attributes + { + get => (int)this.Fields[(int)WixBundleMsiFeatureTupleFields.Attributes]?.Value; + set => this.Set((int)WixBundleMsiFeatureTupleFields.Attributes, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/WixBundleMsiPackageTuple.cs b/src/WixToolset.Data/Tuples/WixBundleMsiPackageTuple.cs new file mode 100644 index 00000000..ce3afc15 --- /dev/null +++ b/src/WixToolset.Data/Tuples/WixBundleMsiPackageTuple.cs @@ -0,0 +1,111 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition WixBundleMsiPackage = new IntermediateTupleDefinition( + TupleDefinitionType.WixBundleMsiPackage, + new[] + { + new IntermediateFieldDefinition(nameof(WixBundleMsiPackageTupleFields.WixBundlePackage_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundleMsiPackageTupleFields.Attributes), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(WixBundleMsiPackageTupleFields.ProductCode), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundleMsiPackageTupleFields.UpgradeCode), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundleMsiPackageTupleFields.ProductVersion), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundleMsiPackageTupleFields.ProductLanguage), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(WixBundleMsiPackageTupleFields.ProductName), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundleMsiPackageTupleFields.Manufacturer), IntermediateFieldType.String), + }, + typeof(WixBundleMsiPackageTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + using System; + + public enum WixBundleMsiPackageTupleFields + { + WixBundlePackage_, + Attributes, + ProductCode, + UpgradeCode, + ProductVersion, + ProductLanguage, + ProductName, + Manufacturer, + } + + [Flags] + public enum WixBundleMsiPackageAttributes + { + DisplayInternalUI = 0x1, + EnableFeatureSelection = 0x4, + ForcePerMachine = 0x2, + SuppressLooseFilePayloadGeneration = 0x8, + } + + public class WixBundleMsiPackageTuple : IntermediateTuple + { + public WixBundleMsiPackageTuple() : base(TupleDefinitions.WixBundleMsiPackage, null, null) + { + } + + public WixBundleMsiPackageTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixBundleMsiPackage, sourceLineNumber, id) + { + } + + public IntermediateField this[WixBundleMsiPackageTupleFields index] => this.Fields[(int)index]; + + public string WixBundlePackage_ + { + get => (string)this.Fields[(int)WixBundleMsiPackageTupleFields.WixBundlePackage_]?.Value; + set => this.Set((int)WixBundleMsiPackageTupleFields.WixBundlePackage_, value); + } + + public WixBundleMsiPackageAttributes Attributes + { + get => (WixBundleMsiPackageAttributes)(int)this.Fields[(int)WixBundleMsiPackageTupleFields.Attributes]?.Value; + set => this.Set((int)WixBundleMsiPackageTupleFields.Attributes, (int)value); + } + + public string ProductCode + { + get => (string)this.Fields[(int)WixBundleMsiPackageTupleFields.ProductCode]?.Value; + set => this.Set((int)WixBundleMsiPackageTupleFields.ProductCode, value); + } + + public string UpgradeCode + { + get => (string)this.Fields[(int)WixBundleMsiPackageTupleFields.UpgradeCode]?.Value; + set => this.Set((int)WixBundleMsiPackageTupleFields.UpgradeCode, value); + } + + public string ProductVersion + { + get => (string)this.Fields[(int)WixBundleMsiPackageTupleFields.ProductVersion]?.Value; + set => this.Set((int)WixBundleMsiPackageTupleFields.ProductVersion, value); + } + + public int ProductLanguage + { + get => (int)this.Fields[(int)WixBundleMsiPackageTupleFields.ProductLanguage]?.Value; + set => this.Set((int)WixBundleMsiPackageTupleFields.ProductLanguage, value); + } + + public string ProductName + { + get => (string)this.Fields[(int)WixBundleMsiPackageTupleFields.ProductName]?.Value; + set => this.Set((int)WixBundleMsiPackageTupleFields.ProductName, value); + } + + public string Manufacturer + { + get => (string)this.Fields[(int)WixBundleMsiPackageTupleFields.Manufacturer]?.Value; + set => this.Set((int)WixBundleMsiPackageTupleFields.Manufacturer, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/WixBundleMsiPropertyTuple.cs b/src/WixToolset.Data/Tuples/WixBundleMsiPropertyTuple.cs new file mode 100644 index 00000000..5eea57ea --- /dev/null +++ b/src/WixToolset.Data/Tuples/WixBundleMsiPropertyTuple.cs @@ -0,0 +1,68 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition WixBundleMsiProperty = new IntermediateTupleDefinition( + TupleDefinitionType.WixBundleMsiProperty, + new[] + { + new IntermediateFieldDefinition(nameof(WixBundleMsiPropertyTupleFields.WixBundlePackage_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundleMsiPropertyTupleFields.Name), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundleMsiPropertyTupleFields.Value), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundleMsiPropertyTupleFields.Condition), IntermediateFieldType.String), + }, + typeof(WixBundleMsiPropertyTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum WixBundleMsiPropertyTupleFields + { + WixBundlePackage_, + Name, + Value, + Condition, + } + + public class WixBundleMsiPropertyTuple : IntermediateTuple + { + public WixBundleMsiPropertyTuple() : base(TupleDefinitions.WixBundleMsiProperty, null, null) + { + } + + public WixBundleMsiPropertyTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixBundleMsiProperty, sourceLineNumber, id) + { + } + + public IntermediateField this[WixBundleMsiPropertyTupleFields index] => this.Fields[(int)index]; + + public string WixBundlePackage_ + { + get => (string)this.Fields[(int)WixBundleMsiPropertyTupleFields.WixBundlePackage_]?.Value; + set => this.Set((int)WixBundleMsiPropertyTupleFields.WixBundlePackage_, value); + } + + public string Name + { + get => (string)this.Fields[(int)WixBundleMsiPropertyTupleFields.Name]?.Value; + set => this.Set((int)WixBundleMsiPropertyTupleFields.Name, value); + } + + public string Value + { + get => (string)this.Fields[(int)WixBundleMsiPropertyTupleFields.Value]?.Value; + set => this.Set((int)WixBundleMsiPropertyTupleFields.Value, value); + } + + public string Condition + { + get => (string)this.Fields[(int)WixBundleMsiPropertyTupleFields.Condition]?.Value; + set => this.Set((int)WixBundleMsiPropertyTupleFields.Condition, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/WixBundleMspPackageTuple.cs b/src/WixToolset.Data/Tuples/WixBundleMspPackageTuple.cs new file mode 100644 index 00000000..219c7735 --- /dev/null +++ b/src/WixToolset.Data/Tuples/WixBundleMspPackageTuple.cs @@ -0,0 +1,86 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition WixBundleMspPackage = new IntermediateTupleDefinition( + TupleDefinitionType.WixBundleMspPackage, + new[] + { + new IntermediateFieldDefinition(nameof(WixBundleMspPackageTupleFields.WixBundlePackage_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundleMspPackageTupleFields.Attributes), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(WixBundleMspPackageTupleFields.PatchCode), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundleMspPackageTupleFields.Manufacturer), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundleMspPackageTupleFields.PatchXml), IntermediateFieldType.String), + }, + typeof(WixBundleMspPackageTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + using System; + + public enum WixBundleMspPackageTupleFields + { + WixBundlePackage_, + Attributes, + PatchCode, + Manufacturer, + PatchXml, + } + + [Flags] + public enum WixBundleMspPackageAttributes + { + DisplayInternalUI = 0x1, + Slipstream = 0x2, + TargetUnspecified = 0x4, + } + + public class WixBundleMspPackageTuple : IntermediateTuple + { + public WixBundleMspPackageTuple() : base(TupleDefinitions.WixBundleMspPackage, null, null) + { + } + + public WixBundleMspPackageTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixBundleMspPackage, sourceLineNumber, id) + { + } + + public IntermediateField this[WixBundleMspPackageTupleFields index] => this.Fields[(int)index]; + + public string WixBundlePackage_ + { + get => (string)this.Fields[(int)WixBundleMspPackageTupleFields.WixBundlePackage_]?.Value; + set => this.Set((int)WixBundleMspPackageTupleFields.WixBundlePackage_, value); + } + + public WixBundleMspPackageAttributes Attributes + { + get => (WixBundleMspPackageAttributes)(int)this.Fields[(int)WixBundleMspPackageTupleFields.Attributes]?.Value; + set => this.Set((int)WixBundleMspPackageTupleFields.Attributes, (int)value); + } + + public string PatchCode + { + get => (string)this.Fields[(int)WixBundleMspPackageTupleFields.PatchCode]?.Value; + set => this.Set((int)WixBundleMspPackageTupleFields.PatchCode, value); + } + + public string Manufacturer + { + get => (string)this.Fields[(int)WixBundleMspPackageTupleFields.Manufacturer]?.Value; + set => this.Set((int)WixBundleMspPackageTupleFields.Manufacturer, value); + } + + public string PatchXml + { + get => (string)this.Fields[(int)WixBundleMspPackageTupleFields.PatchXml]?.Value; + set => this.Set((int)WixBundleMspPackageTupleFields.PatchXml, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/WixBundleMsuPackageTuple.cs b/src/WixToolset.Data/Tuples/WixBundleMsuPackageTuple.cs new file mode 100644 index 00000000..f6f71d6d --- /dev/null +++ b/src/WixToolset.Data/Tuples/WixBundleMsuPackageTuple.cs @@ -0,0 +1,60 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition WixBundleMsuPackage = new IntermediateTupleDefinition( + TupleDefinitionType.WixBundleMsuPackage, + new[] + { + new IntermediateFieldDefinition(nameof(WixBundleMsuPackageTupleFields.WixBundlePackage_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundleMsuPackageTupleFields.DetectCondition), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundleMsuPackageTupleFields.MsuKB), IntermediateFieldType.String), + }, + typeof(WixBundleMsuPackageTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum WixBundleMsuPackageTupleFields + { + WixBundlePackage_, + DetectCondition, + MsuKB, + } + + public class WixBundleMsuPackageTuple : IntermediateTuple + { + public WixBundleMsuPackageTuple() : base(TupleDefinitions.WixBundleMsuPackage, null, null) + { + } + + public WixBundleMsuPackageTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixBundleMsuPackage, sourceLineNumber, id) + { + } + + public IntermediateField this[WixBundleMsuPackageTupleFields index] => this.Fields[(int)index]; + + public string WixBundlePackage_ + { + get => (string)this.Fields[(int)WixBundleMsuPackageTupleFields.WixBundlePackage_]?.Value; + set => this.Set((int)WixBundleMsuPackageTupleFields.WixBundlePackage_, value); + } + + public string DetectCondition + { + get => (string)this.Fields[(int)WixBundleMsuPackageTupleFields.DetectCondition]?.Value; + set => this.Set((int)WixBundleMsuPackageTupleFields.DetectCondition, value); + } + + public string MsuKB + { + get => (string)this.Fields[(int)WixBundleMsuPackageTupleFields.MsuKB]?.Value; + set => this.Set((int)WixBundleMsuPackageTupleFields.MsuKB, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/WixBundlePackageCommandLineTuple.cs b/src/WixToolset.Data/Tuples/WixBundlePackageCommandLineTuple.cs new file mode 100644 index 00000000..0ca895c0 --- /dev/null +++ b/src/WixToolset.Data/Tuples/WixBundlePackageCommandLineTuple.cs @@ -0,0 +1,76 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition WixBundlePackageCommandLine = new IntermediateTupleDefinition( + TupleDefinitionType.WixBundlePackageCommandLine, + new[] + { + new IntermediateFieldDefinition(nameof(WixBundlePackageCommandLineTupleFields.WixBundlePackage_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundlePackageCommandLineTupleFields.InstallArgument), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundlePackageCommandLineTupleFields.UninstallArgument), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundlePackageCommandLineTupleFields.RepairArgument), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundlePackageCommandLineTupleFields.Condition), IntermediateFieldType.String), + }, + typeof(WixBundlePackageCommandLineTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum WixBundlePackageCommandLineTupleFields + { + WixBundlePackage_, + InstallArgument, + UninstallArgument, + RepairArgument, + Condition, + } + + public class WixBundlePackageCommandLineTuple : IntermediateTuple + { + public WixBundlePackageCommandLineTuple() : base(TupleDefinitions.WixBundlePackageCommandLine, null, null) + { + } + + public WixBundlePackageCommandLineTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixBundlePackageCommandLine, sourceLineNumber, id) + { + } + + public IntermediateField this[WixBundlePackageCommandLineTupleFields index] => this.Fields[(int)index]; + + public string WixBundlePackage_ + { + get => (string)this.Fields[(int)WixBundlePackageCommandLineTupleFields.WixBundlePackage_]?.Value; + set => this.Set((int)WixBundlePackageCommandLineTupleFields.WixBundlePackage_, value); + } + + public string InstallArgument + { + get => (string)this.Fields[(int)WixBundlePackageCommandLineTupleFields.InstallArgument]?.Value; + set => this.Set((int)WixBundlePackageCommandLineTupleFields.InstallArgument, value); + } + + public string UninstallArgument + { + get => (string)this.Fields[(int)WixBundlePackageCommandLineTupleFields.UninstallArgument]?.Value; + set => this.Set((int)WixBundlePackageCommandLineTupleFields.UninstallArgument, value); + } + + public string RepairArgument + { + get => (string)this.Fields[(int)WixBundlePackageCommandLineTupleFields.RepairArgument]?.Value; + set => this.Set((int)WixBundlePackageCommandLineTupleFields.RepairArgument, value); + } + + public string Condition + { + get => (string)this.Fields[(int)WixBundlePackageCommandLineTupleFields.Condition]?.Value; + set => this.Set((int)WixBundlePackageCommandLineTupleFields.Condition, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/WixBundlePackageExitCodeTuple.cs b/src/WixToolset.Data/Tuples/WixBundlePackageExitCodeTuple.cs new file mode 100644 index 00000000..64c91316 --- /dev/null +++ b/src/WixToolset.Data/Tuples/WixBundlePackageExitCodeTuple.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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition WixBundlePackageExitCode = new IntermediateTupleDefinition( + TupleDefinitionType.WixBundlePackageExitCode, + new[] + { + new IntermediateFieldDefinition(nameof(WixBundlePackageExitCodeTupleFields.ChainPackageId), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundlePackageExitCodeTupleFields.Code), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(WixBundlePackageExitCodeTupleFields.Behavior), IntermediateFieldType.String), + }, + typeof(WixBundlePackageExitCodeTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + using System; + + public enum WixBundlePackageExitCodeTupleFields + { + ChainPackageId, + Code, + Behavior, + } + + public enum ExitCodeBehaviorType + { + NotSet = -1, + Success, + Error, + ScheduleReboot, + ForceReboot, + } + + public class WixBundlePackageExitCodeTuple : IntermediateTuple + { + public WixBundlePackageExitCodeTuple() : base(TupleDefinitions.WixBundlePackageExitCode, null, null) + { + } + + public WixBundlePackageExitCodeTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixBundlePackageExitCode, sourceLineNumber, id) + { + } + + public IntermediateField this[WixBundlePackageExitCodeTupleFields index] => this.Fields[(int)index]; + + public string ChainPackageId + { + get => (string)this.Fields[(int)WixBundlePackageExitCodeTupleFields.ChainPackageId]?.Value; + set => this.Set((int)WixBundlePackageExitCodeTupleFields.ChainPackageId, value); + } + + public int Code + { + get => (int)this.Fields[(int)WixBundlePackageExitCodeTupleFields.Code]?.Value; + set => this.Set((int)WixBundlePackageExitCodeTupleFields.Code, value); + } + + public ExitCodeBehaviorType Behavior + { + get => Enum.TryParse((string)this.Fields[(int)WixBundlePackageExitCodeTupleFields.Behavior]?.Value, true, out ExitCodeBehaviorType value) ? value : ExitCodeBehaviorType.NotSet; + set => this.Set((int)WixBundlePackageExitCodeTupleFields.Behavior, value.ToString()); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/WixBundlePackageGroupTuple.cs b/src/WixToolset.Data/Tuples/WixBundlePackageGroupTuple.cs new file mode 100644 index 00000000..56711155 --- /dev/null +++ b/src/WixToolset.Data/Tuples/WixBundlePackageGroupTuple.cs @@ -0,0 +1,44 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition WixBundlePackageGroup = new IntermediateTupleDefinition( + TupleDefinitionType.WixBundlePackageGroup, + new[] + { + new IntermediateFieldDefinition(nameof(WixBundlePackageGroupTupleFields.WixBundlePackageGroup), IntermediateFieldType.String), + }, + typeof(WixBundlePackageGroupTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum WixBundlePackageGroupTupleFields + { + WixBundlePackageGroup, + } + + public class WixBundlePackageGroupTuple : IntermediateTuple + { + public WixBundlePackageGroupTuple() : base(TupleDefinitions.WixBundlePackageGroup, null, null) + { + } + + public WixBundlePackageGroupTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixBundlePackageGroup, sourceLineNumber, id) + { + } + + public IntermediateField this[WixBundlePackageGroupTupleFields index] => this.Fields[(int)index]; + + public string WixBundlePackageGroup + { + get => (string)this.Fields[(int)WixBundlePackageGroupTupleFields.WixBundlePackageGroup]?.Value; + set => this.Set((int)WixBundlePackageGroupTupleFields.WixBundlePackageGroup, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/WixBundlePackageTuple.cs b/src/WixToolset.Data/Tuples/WixBundlePackageTuple.cs new file mode 100644 index 00000000..e0eedce1 --- /dev/null +++ b/src/WixToolset.Data/Tuples/WixBundlePackageTuple.cs @@ -0,0 +1,216 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition WixBundlePackage = new IntermediateTupleDefinition( + TupleDefinitionType.WixBundlePackage, + new[] + { + new IntermediateFieldDefinition(nameof(WixBundlePackageTupleFields.WixChainItem_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundlePackageTupleFields.Type), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundlePackageTupleFields.Payload_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundlePackageTupleFields.Attributes), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(WixBundlePackageTupleFields.InstallCondition), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundlePackageTupleFields.Cache), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(WixBundlePackageTupleFields.CacheId), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundlePackageTupleFields.Vital), IntermediateFieldType.Bool), + new IntermediateFieldDefinition(nameof(WixBundlePackageTupleFields.PerMachine), IntermediateFieldType.Bool), + new IntermediateFieldDefinition(nameof(WixBundlePackageTupleFields.LogPathVariable), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundlePackageTupleFields.RollbackLogPathVariable), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundlePackageTupleFields.Size), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(WixBundlePackageTupleFields.InstallSize), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(WixBundlePackageTupleFields.Version), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundlePackageTupleFields.Language), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(WixBundlePackageTupleFields.DisplayName), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundlePackageTupleFields.Description), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundlePackageTupleFields.RollbackBoundary_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundlePackageTupleFields.RollbackBoundaryBackward_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundlePackageTupleFields.x64), IntermediateFieldType.Number), + }, + typeof(WixBundlePackageTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + using System; + + public enum WixBundlePackageTupleFields + { + WixChainItem_, + Type, + Payload_, + Attributes, + InstallCondition, + Cache, + CacheId, + Vital, + PerMachine, + LogPathVariable, + RollbackLogPathVariable, + Size, + InstallSize, + Version, + Language, + DisplayName, + Description, + RollbackBoundary_, + RollbackBoundaryBackward_, + x64, + } + + /// + /// Types of bundle packages. + /// + public enum WixBundlePackageType + { + Exe, + Msi, + Msp, + Msu, + } + + [Flags] + public enum WixBundlePackageAttributes + { + Permanent = 0x1, + Visible = 0x2, + } + + public class WixBundlePackageTuple : IntermediateTuple + { + public WixBundlePackageTuple() : base(TupleDefinitions.WixBundlePackage, null, null) + { + } + + public WixBundlePackageTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixBundlePackage, sourceLineNumber, id) + { + } + + public IntermediateField this[WixBundlePackageTupleFields index] => this.Fields[(int)index]; + + public string WixChainItem_ + { + get => (string)this.Fields[(int)WixBundlePackageTupleFields.WixChainItem_]?.Value; + set => this.Set((int)WixBundlePackageTupleFields.WixChainItem_, value); + } + + public WixBundlePackageType Type + { + get => (WixBundlePackageType)Enum.Parse(typeof(WixBundlePackageType), (string)this.Fields[(int)WixBundlePackageTupleFields.Type]?.Value, true); + set => this.Set((int)WixBundlePackageTupleFields.Type, value.ToString()); + } + + public string Payload_ + { + get => (string)this.Fields[(int)WixBundlePackageTupleFields.Payload_]?.Value; + set => this.Set((int)WixBundlePackageTupleFields.Payload_, value); + } + + public WixBundlePackageAttributes Attributes + { + get => (WixBundlePackageAttributes)(int)this.Fields[(int)WixBundlePackageTupleFields.Attributes]?.Value; + set => this.Set((int)WixBundlePackageTupleFields.Attributes, (int)value); + } + + public string InstallCondition + { + get => (string)this.Fields[(int)WixBundlePackageTupleFields.InstallCondition]?.Value; + set => this.Set((int)WixBundlePackageTupleFields.InstallCondition, value); + } + + public YesNoAlwaysType Cache + { + get => Enum.TryParse((string)this.Fields[(int)WixBundlePackageTupleFields.Cache]?.Value, true, out YesNoAlwaysType value) ? value : YesNoAlwaysType.NotSet; + set => this.Set((int)WixBundlePackageTupleFields.Cache, value); + } + + public string CacheId + { + get => (string)this.Fields[(int)WixBundlePackageTupleFields.CacheId]?.Value; + set => this.Set((int)WixBundlePackageTupleFields.CacheId, value); + } + + public bool? Vital + { + get => (bool?)this.Fields[(int)WixBundlePackageTupleFields.Vital]?.Value; + set => this.Set((int)WixBundlePackageTupleFields.Vital, value); + } + + public YesNoDefaultType PerMachine + { + get => Enum.TryParse((string)this.Fields[(int)WixBundlePackageTupleFields.PerMachine]?.Value, true, out YesNoDefaultType value) ? value : YesNoDefaultType.NotSet; + set => this.Set((int)WixBundlePackageTupleFields.PerMachine, value); + } + + public string LogPathVariable + { + get => (string)this.Fields[(int)WixBundlePackageTupleFields.LogPathVariable]?.Value; + set => this.Set((int)WixBundlePackageTupleFields.LogPathVariable, value); + } + + public string RollbackLogPathVariable + { + get => (string)this.Fields[(int)WixBundlePackageTupleFields.RollbackLogPathVariable]?.Value; + set => this.Set((int)WixBundlePackageTupleFields.RollbackLogPathVariable, value); + } + + public int Size + { + get => (int)this.Fields[(int)WixBundlePackageTupleFields.Size]?.Value; + set => this.Set((int)WixBundlePackageTupleFields.Size, value); + } + + public int InstallSize + { + get => (int)this.Fields[(int)WixBundlePackageTupleFields.InstallSize]?.Value; + set => this.Set((int)WixBundlePackageTupleFields.InstallSize, value); + } + + public string Version + { + get => (string)this.Fields[(int)WixBundlePackageTupleFields.Version]?.Value; + set => this.Set((int)WixBundlePackageTupleFields.Version, value); + } + + public int Language + { + get => (int)this.Fields[(int)WixBundlePackageTupleFields.Language]?.Value; + set => this.Set((int)WixBundlePackageTupleFields.Language, value); + } + + public string DisplayName + { + get => (string)this.Fields[(int)WixBundlePackageTupleFields.DisplayName]?.Value; + set => this.Set((int)WixBundlePackageTupleFields.DisplayName, value); + } + + public string Description + { + get => (string)this.Fields[(int)WixBundlePackageTupleFields.Description]?.Value; + set => this.Set((int)WixBundlePackageTupleFields.Description, value); + } + + public string RollbackBoundary_ + { + get => (string)this.Fields[(int)WixBundlePackageTupleFields.RollbackBoundary_]?.Value; + set => this.Set((int)WixBundlePackageTupleFields.RollbackBoundary_, value); + } + + public string RollbackBoundaryBackward_ + { + get => (string)this.Fields[(int)WixBundlePackageTupleFields.RollbackBoundaryBackward_]?.Value; + set => this.Set((int)WixBundlePackageTupleFields.RollbackBoundaryBackward_, value); + } + + public int x64 + { + get => (int)this.Fields[(int)WixBundlePackageTupleFields.x64]?.Value; + set => this.Set((int)WixBundlePackageTupleFields.x64, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/WixBundlePatchTargetCodeTuple.cs b/src/WixToolset.Data/Tuples/WixBundlePatchTargetCodeTuple.cs new file mode 100644 index 00000000..d34c0d2a --- /dev/null +++ b/src/WixToolset.Data/Tuples/WixBundlePatchTargetCodeTuple.cs @@ -0,0 +1,60 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition WixBundlePatchTargetCode = new IntermediateTupleDefinition( + TupleDefinitionType.WixBundlePatchTargetCode, + new[] + { + new IntermediateFieldDefinition(nameof(WixBundlePatchTargetCodeTupleFields.PackageId), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundlePatchTargetCodeTupleFields.TargetCode), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundlePatchTargetCodeTupleFields.Attributes), IntermediateFieldType.Number), + }, + typeof(WixBundlePatchTargetCodeTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum WixBundlePatchTargetCodeTupleFields + { + PackageId, + TargetCode, + Attributes, + } + + public class WixBundlePatchTargetCodeTuple : IntermediateTuple + { + public WixBundlePatchTargetCodeTuple() : base(TupleDefinitions.WixBundlePatchTargetCode, null, null) + { + } + + public WixBundlePatchTargetCodeTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixBundlePatchTargetCode, sourceLineNumber, id) + { + } + + public IntermediateField this[WixBundlePatchTargetCodeTupleFields index] => this.Fields[(int)index]; + + public string PackageId + { + get => (string)this.Fields[(int)WixBundlePatchTargetCodeTupleFields.PackageId]?.Value; + set => this.Set((int)WixBundlePatchTargetCodeTupleFields.PackageId, value); + } + + public string TargetCode + { + get => (string)this.Fields[(int)WixBundlePatchTargetCodeTupleFields.TargetCode]?.Value; + set => this.Set((int)WixBundlePatchTargetCodeTupleFields.TargetCode, value); + } + + public int Attributes + { + get => (int)this.Fields[(int)WixBundlePatchTargetCodeTupleFields.Attributes]?.Value; + set => this.Set((int)WixBundlePatchTargetCodeTupleFields.Attributes, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/WixBundlePayloadGroupTuple.cs b/src/WixToolset.Data/Tuples/WixBundlePayloadGroupTuple.cs new file mode 100644 index 00000000..c1f0df6a --- /dev/null +++ b/src/WixToolset.Data/Tuples/WixBundlePayloadGroupTuple.cs @@ -0,0 +1,44 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition WixBundlePayloadGroup = new IntermediateTupleDefinition( + TupleDefinitionType.WixBundlePayloadGroup, + new[] + { + new IntermediateFieldDefinition(nameof(WixBundlePayloadGroupTupleFields.WixBundlePayloadGroup), IntermediateFieldType.String), + }, + typeof(WixBundlePayloadGroupTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum WixBundlePayloadGroupTupleFields + { + WixBundlePayloadGroup, + } + + public class WixBundlePayloadGroupTuple : IntermediateTuple + { + public WixBundlePayloadGroupTuple() : base(TupleDefinitions.WixBundlePayloadGroup, null, null) + { + } + + public WixBundlePayloadGroupTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixBundlePayloadGroup, sourceLineNumber, id) + { + } + + public IntermediateField this[WixBundlePayloadGroupTupleFields index] => this.Fields[(int)index]; + + public string WixBundlePayloadGroup + { + get => (string)this.Fields[(int)WixBundlePayloadGroupTupleFields.WixBundlePayloadGroup]?.Value; + set => this.Set((int)WixBundlePayloadGroupTupleFields.WixBundlePayloadGroup, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/WixBundlePayloadTuple.cs b/src/WixToolset.Data/Tuples/WixBundlePayloadTuple.cs new file mode 100644 index 00000000..d1c02387 --- /dev/null +++ b/src/WixToolset.Data/Tuples/WixBundlePayloadTuple.cs @@ -0,0 +1,214 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition WixBundlePayload = new IntermediateTupleDefinition( + TupleDefinitionType.WixBundlePayload, + new[] + { + new IntermediateFieldDefinition(nameof(WixBundlePayloadTupleFields.WixBundlePayload), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundlePayloadTupleFields.Name), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundlePayloadTupleFields.SourceFile), IntermediateFieldType.Path), + new IntermediateFieldDefinition(nameof(WixBundlePayloadTupleFields.DownloadUrl), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundlePayloadTupleFields.Compressed), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundlePayloadTupleFields.UnresolvedSourceFile), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundlePayloadTupleFields.DisplayName), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundlePayloadTupleFields.Description), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundlePayloadTupleFields.EnableSignatureValidation), IntermediateFieldType.Bool), + new IntermediateFieldDefinition(nameof(WixBundlePayloadTupleFields.FileSize), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(WixBundlePayloadTupleFields.Version), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundlePayloadTupleFields.Hash), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundlePayloadTupleFields.PublicKey), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundlePayloadTupleFields.Thumbprint), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundlePayloadTupleFields.Catalog_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundlePayloadTupleFields.Container_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundlePayloadTupleFields.Package), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundlePayloadTupleFields.ContentFile), IntermediateFieldType.Bool), + new IntermediateFieldDefinition(nameof(WixBundlePayloadTupleFields.EmbeddedId), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundlePayloadTupleFields.LayoutOnly), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(WixBundlePayloadTupleFields.Packaging), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(WixBundlePayloadTupleFields.ParentPackagePayload_), IntermediateFieldType.String), + }, + typeof(WixBundlePayloadTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + using System; + + public enum WixBundlePayloadTupleFields + { + WixBundlePayload, + Name, + SourceFile, + DownloadUrl, + Compressed, + UnresolvedSourceFile, + DisplayName, + Description, + EnableSignatureValidation, + FileSize, + Version, + Hash, + PublicKey, + Thumbprint, + Catalog_, + Container_, + Package, + ContentFile, + EmbeddedId, + LayoutOnly, + Packaging, + ParentPackagePayload_, + } + + public class WixBundlePayloadTuple : IntermediateTuple + { + public WixBundlePayloadTuple() : base(TupleDefinitions.WixBundlePayload, null, null) + { + } + + public WixBundlePayloadTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixBundlePayload, sourceLineNumber, id) + { + } + + public IntermediateField this[WixBundlePayloadTupleFields index] => this.Fields[(int)index]; + + public string WixBundlePayload + { + get => (string)this.Fields[(int)WixBundlePayloadTupleFields.WixBundlePayload]?.Value; + set => this.Set((int)WixBundlePayloadTupleFields.WixBundlePayload, value); + } + + public string Name + { + get => (string)this.Fields[(int)WixBundlePayloadTupleFields.Name]?.Value; + set => this.Set((int)WixBundlePayloadTupleFields.Name, value); + } + + public string SourceFile + { + get => (string)this.Fields[(int)WixBundlePayloadTupleFields.SourceFile]?.Value; + set => this.Set((int)WixBundlePayloadTupleFields.SourceFile, value); + } + + public string DownloadUrl + { + get => (string)this.Fields[(int)WixBundlePayloadTupleFields.DownloadUrl]?.Value; + set => this.Set((int)WixBundlePayloadTupleFields.DownloadUrl, value); + } + + public YesNoDefaultType Compressed + { + get => Enum.TryParse((string)this.Fields[(int)WixBundlePayloadTupleFields.Compressed]?.Value, true, out YesNoDefaultType value) ? value : YesNoDefaultType.NotSet; + set => this.Set((int)WixBundlePayloadTupleFields.Compressed, value); + } + + public string UnresolvedSourceFile + { + get => (string)this.Fields[(int)WixBundlePayloadTupleFields.UnresolvedSourceFile]?.Value; + set => this.Set((int)WixBundlePayloadTupleFields.UnresolvedSourceFile, value); + } + + public string DisplayName + { + get => (string)this.Fields[(int)WixBundlePayloadTupleFields.DisplayName]?.Value; + set => this.Set((int)WixBundlePayloadTupleFields.DisplayName, value); + } + + public string Description + { + get => (string)this.Fields[(int)WixBundlePayloadTupleFields.Description]?.Value; + set => this.Set((int)WixBundlePayloadTupleFields.Description, value); + } + + public bool EnableSignatureValidation + { + get => (bool)this.Fields[(int)WixBundlePayloadTupleFields.EnableSignatureValidation]?.Value; + set => this.Set((int)WixBundlePayloadTupleFields.EnableSignatureValidation, value); + } + + public int FileSize + { + get => (int)this.Fields[(int)WixBundlePayloadTupleFields.FileSize]?.Value; + set => this.Set((int)WixBundlePayloadTupleFields.FileSize, value); + } + + public string Version + { + get => (string)this.Fields[(int)WixBundlePayloadTupleFields.Version]?.Value; + set => this.Set((int)WixBundlePayloadTupleFields.Version, value); + } + + public string Hash + { + get => (string)this.Fields[(int)WixBundlePayloadTupleFields.Hash]?.Value; + set => this.Set((int)WixBundlePayloadTupleFields.Hash, value); + } + + public string PublicKey + { + get => (string)this.Fields[(int)WixBundlePayloadTupleFields.PublicKey]?.Value; + set => this.Set((int)WixBundlePayloadTupleFields.PublicKey, value); + } + + public string Thumbprint + { + get => (string)this.Fields[(int)WixBundlePayloadTupleFields.Thumbprint]?.Value; + set => this.Set((int)WixBundlePayloadTupleFields.Thumbprint, value); + } + + public string Catalog_ + { + get => (string)this.Fields[(int)WixBundlePayloadTupleFields.Catalog_]?.Value; + set => this.Set((int)WixBundlePayloadTupleFields.Catalog_, value); + } + + public string Container_ + { + get => (string)this.Fields[(int)WixBundlePayloadTupleFields.Container_]?.Value; + set => this.Set((int)WixBundlePayloadTupleFields.Container_, value); + } + + public string Package + { + get => (string)this.Fields[(int)WixBundlePayloadTupleFields.Package]?.Value; + set => this.Set((int)WixBundlePayloadTupleFields.Package, value); + } + + public bool ContentFile + { + get => (bool)this.Fields[(int)WixBundlePayloadTupleFields.ContentFile]?.Value; + set => this.Set((int)WixBundlePayloadTupleFields.ContentFile, value); + } + + public string EmbeddedId + { + get => (string)this.Fields[(int)WixBundlePayloadTupleFields.EmbeddedId]?.Value; + set => this.Set((int)WixBundlePayloadTupleFields.EmbeddedId, value); + } + + public int LayoutOnly + { + get => (int)this.Fields[(int)WixBundlePayloadTupleFields.LayoutOnly]?.Value; + set => this.Set((int)WixBundlePayloadTupleFields.LayoutOnly, value); + } + + public int Packaging + { + get => (int)this.Fields[(int)WixBundlePayloadTupleFields.Packaging]?.Value; + set => this.Set((int)WixBundlePayloadTupleFields.Packaging, value); + } + + public string ParentPackagePayload_ + { + get => (string)this.Fields[(int)WixBundlePayloadTupleFields.ParentPackagePayload_]?.Value; + set => this.Set((int)WixBundlePayloadTupleFields.ParentPackagePayload_, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/WixBundlePropertiesTuple.cs b/src/WixToolset.Data/Tuples/WixBundlePropertiesTuple.cs new file mode 100644 index 00000000..8a42c3c6 --- /dev/null +++ b/src/WixToolset.Data/Tuples/WixBundlePropertiesTuple.cs @@ -0,0 +1,84 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition WixBundleProperties = new IntermediateTupleDefinition( + TupleDefinitionType.WixBundleProperties, + new[] + { + new IntermediateFieldDefinition(nameof(WixBundlePropertiesTupleFields.DisplayName), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundlePropertiesTupleFields.LogPathVariable), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundlePropertiesTupleFields.Compressed), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundlePropertiesTupleFields.Id), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundlePropertiesTupleFields.UpgradeCode), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundlePropertiesTupleFields.PerMachine), IntermediateFieldType.String), + }, + typeof(WixBundlePropertiesTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum WixBundlePropertiesTupleFields + { + DisplayName, + LogPathVariable, + Compressed, + Id, + UpgradeCode, + PerMachine, + } + + public class WixBundlePropertiesTuple : IntermediateTuple + { + public WixBundlePropertiesTuple() : base(TupleDefinitions.WixBundleProperties, null, null) + { + } + + public WixBundlePropertiesTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixBundleProperties, sourceLineNumber, id) + { + } + + public IntermediateField this[WixBundlePropertiesTupleFields index] => this.Fields[(int)index]; + + public string DisplayName + { + get => (string)this.Fields[(int)WixBundlePropertiesTupleFields.DisplayName]?.Value; + set => this.Set((int)WixBundlePropertiesTupleFields.DisplayName, value); + } + + public string LogPathVariable + { + get => (string)this.Fields[(int)WixBundlePropertiesTupleFields.LogPathVariable]?.Value; + set => this.Set((int)WixBundlePropertiesTupleFields.LogPathVariable, value); + } + + public string Compressed + { + get => (string)this.Fields[(int)WixBundlePropertiesTupleFields.Compressed]?.Value; + set => this.Set((int)WixBundlePropertiesTupleFields.Compressed, value); + } + + public string Id + { + get => (string)this.Fields[(int)WixBundlePropertiesTupleFields.Id]?.Value; + set => this.Set((int)WixBundlePropertiesTupleFields.Id, value); + } + + public string UpgradeCode + { + get => (string)this.Fields[(int)WixBundlePropertiesTupleFields.UpgradeCode]?.Value; + set => this.Set((int)WixBundlePropertiesTupleFields.UpgradeCode, value); + } + + public string PerMachine + { + get => (string)this.Fields[(int)WixBundlePropertiesTupleFields.PerMachine]?.Value; + set => this.Set((int)WixBundlePropertiesTupleFields.PerMachine, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/WixBundleRelatedPackageTuple.cs b/src/WixToolset.Data/Tuples/WixBundleRelatedPackageTuple.cs new file mode 100644 index 00000000..d3e1069a --- /dev/null +++ b/src/WixToolset.Data/Tuples/WixBundleRelatedPackageTuple.cs @@ -0,0 +1,108 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition WixBundleRelatedPackage = new IntermediateTupleDefinition( + TupleDefinitionType.WixBundleRelatedPackage, + new[] + { + new IntermediateFieldDefinition(nameof(WixBundleRelatedPackageTupleFields.WixBundlePackage_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundleRelatedPackageTupleFields.Id), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundleRelatedPackageTupleFields.MinVersion), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundleRelatedPackageTupleFields.MaxVersion), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundleRelatedPackageTupleFields.Languages), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundleRelatedPackageTupleFields.MinInclusive), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(WixBundleRelatedPackageTupleFields.MaxInclusive), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(WixBundleRelatedPackageTupleFields.LangInclusive), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(WixBundleRelatedPackageTupleFields.OnlyDetect), IntermediateFieldType.Number), + }, + typeof(WixBundleRelatedPackageTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum WixBundleRelatedPackageTupleFields + { + WixBundlePackage_, + Id, + MinVersion, + MaxVersion, + Languages, + MinInclusive, + MaxInclusive, + LangInclusive, + OnlyDetect, + } + + public class WixBundleRelatedPackageTuple : IntermediateTuple + { + public WixBundleRelatedPackageTuple() : base(TupleDefinitions.WixBundleRelatedPackage, null, null) + { + } + + public WixBundleRelatedPackageTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixBundleRelatedPackage, sourceLineNumber, id) + { + } + + public IntermediateField this[WixBundleRelatedPackageTupleFields index] => this.Fields[(int)index]; + + public string WixBundlePackage_ + { + get => (string)this.Fields[(int)WixBundleRelatedPackageTupleFields.WixBundlePackage_]?.Value; + set => this.Set((int)WixBundleRelatedPackageTupleFields.WixBundlePackage_, value); + } + + public string Id + { + get => (string)this.Fields[(int)WixBundleRelatedPackageTupleFields.Id]?.Value; + set => this.Set((int)WixBundleRelatedPackageTupleFields.Id, value); + } + + public string MinVersion + { + get => (string)this.Fields[(int)WixBundleRelatedPackageTupleFields.MinVersion]?.Value; + set => this.Set((int)WixBundleRelatedPackageTupleFields.MinVersion, value); + } + + public string MaxVersion + { + get => (string)this.Fields[(int)WixBundleRelatedPackageTupleFields.MaxVersion]?.Value; + set => this.Set((int)WixBundleRelatedPackageTupleFields.MaxVersion, value); + } + + public string Languages + { + get => (string)this.Fields[(int)WixBundleRelatedPackageTupleFields.Languages]?.Value; + set => this.Set((int)WixBundleRelatedPackageTupleFields.Languages, value); + } + + public int MinInclusive + { + get => (int)this.Fields[(int)WixBundleRelatedPackageTupleFields.MinInclusive]?.Value; + set => this.Set((int)WixBundleRelatedPackageTupleFields.MinInclusive, value); + } + + public int MaxInclusive + { + get => (int)this.Fields[(int)WixBundleRelatedPackageTupleFields.MaxInclusive]?.Value; + set => this.Set((int)WixBundleRelatedPackageTupleFields.MaxInclusive, value); + } + + public int LangInclusive + { + get => (int)this.Fields[(int)WixBundleRelatedPackageTupleFields.LangInclusive]?.Value; + set => this.Set((int)WixBundleRelatedPackageTupleFields.LangInclusive, value); + } + + public int OnlyDetect + { + get => (int)this.Fields[(int)WixBundleRelatedPackageTupleFields.OnlyDetect]?.Value; + set => this.Set((int)WixBundleRelatedPackageTupleFields.OnlyDetect, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/WixBundleRollbackBoundaryTuple.cs b/src/WixToolset.Data/Tuples/WixBundleRollbackBoundaryTuple.cs new file mode 100644 index 00000000..d08f0eb9 --- /dev/null +++ b/src/WixToolset.Data/Tuples/WixBundleRollbackBoundaryTuple.cs @@ -0,0 +1,60 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition WixBundleRollbackBoundary = new IntermediateTupleDefinition( + TupleDefinitionType.WixBundleRollbackBoundary, + new[] + { + new IntermediateFieldDefinition(nameof(WixBundleRollbackBoundaryTupleFields.WixChainItem_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundleRollbackBoundaryTupleFields.Vital), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(WixBundleRollbackBoundaryTupleFields.Transaction), IntermediateFieldType.Number), + }, + typeof(WixBundleRollbackBoundaryTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum WixBundleRollbackBoundaryTupleFields + { + WixChainItem_, + Vital, + Transaction, + } + + public class WixBundleRollbackBoundaryTuple : IntermediateTuple + { + public WixBundleRollbackBoundaryTuple() : base(TupleDefinitions.WixBundleRollbackBoundary, null, null) + { + } + + public WixBundleRollbackBoundaryTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixBundleRollbackBoundary, sourceLineNumber, id) + { + } + + public IntermediateField this[WixBundleRollbackBoundaryTupleFields index] => this.Fields[(int)index]; + + public string WixChainItem_ + { + get => (string)this.Fields[(int)WixBundleRollbackBoundaryTupleFields.WixChainItem_]?.Value; + set => this.Set((int)WixBundleRollbackBoundaryTupleFields.WixChainItem_, value); + } + + public bool? Vital + { + get => (bool?)this.Fields[(int)WixBundleRollbackBoundaryTupleFields.Vital]?.Value; + set => this.Set((int)WixBundleRollbackBoundaryTupleFields.Vital, value); + } + + public bool? Transaction + { + get => (bool?)this.Fields[(int)WixBundleRollbackBoundaryTupleFields.Transaction]?.Value; + set => this.Set((int)WixBundleRollbackBoundaryTupleFields.Transaction, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/WixBundleSlipstreamMspTuple.cs b/src/WixToolset.Data/Tuples/WixBundleSlipstreamMspTuple.cs new file mode 100644 index 00000000..c0ab124d --- /dev/null +++ b/src/WixToolset.Data/Tuples/WixBundleSlipstreamMspTuple.cs @@ -0,0 +1,52 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition WixBundleSlipstreamMsp = new IntermediateTupleDefinition( + TupleDefinitionType.WixBundleSlipstreamMsp, + new[] + { + new IntermediateFieldDefinition(nameof(WixBundleSlipstreamMspTupleFields.WixBundlePackage_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundleSlipstreamMspTupleFields.WixBundlePackage_Msp), IntermediateFieldType.String), + }, + typeof(WixBundleSlipstreamMspTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum WixBundleSlipstreamMspTupleFields + { + WixBundlePackage_, + WixBundlePackage_Msp, + } + + public class WixBundleSlipstreamMspTuple : IntermediateTuple + { + public WixBundleSlipstreamMspTuple() : base(TupleDefinitions.WixBundleSlipstreamMsp, null, null) + { + } + + public WixBundleSlipstreamMspTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixBundleSlipstreamMsp, sourceLineNumber, id) + { + } + + public IntermediateField this[WixBundleSlipstreamMspTupleFields index] => this.Fields[(int)index]; + + public string WixBundlePackage_ + { + get => (string)this.Fields[(int)WixBundleSlipstreamMspTupleFields.WixBundlePackage_]?.Value; + set => this.Set((int)WixBundleSlipstreamMspTupleFields.WixBundlePackage_, value); + } + + public string WixBundlePackage_Msp + { + get => (string)this.Fields[(int)WixBundleSlipstreamMspTupleFields.WixBundlePackage_Msp]?.Value; + set => this.Set((int)WixBundleSlipstreamMspTupleFields.WixBundlePackage_Msp, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/WixBundleTuple.cs b/src/WixToolset.Data/Tuples/WixBundleTuple.cs new file mode 100644 index 00000000..4647347b --- /dev/null +++ b/src/WixToolset.Data/Tuples/WixBundleTuple.cs @@ -0,0 +1,220 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition WixBundle = new IntermediateTupleDefinition( + TupleDefinitionType.WixBundle, + new[] + { + new IntermediateFieldDefinition(nameof(WixBundleTupleFields.Version), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundleTupleFields.Copyright), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundleTupleFields.Name), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundleTupleFields.AboutUrl), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundleTupleFields.DisableModify), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(WixBundleTupleFields.DisableRemove), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(WixBundleTupleFields.DisableRepair), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(WixBundleTupleFields.HelpTelephone), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundleTupleFields.HelpUrl), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundleTupleFields.Manufacturer), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundleTupleFields.UpdateUrl), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundleTupleFields.Compressed), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(WixBundleTupleFields.LogPrefixAndExtension), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundleTupleFields.IconSourceFile), IntermediateFieldType.Path), + new IntermediateFieldDefinition(nameof(WixBundleTupleFields.SplashScreenSourceFile), IntermediateFieldType.Path), + new IntermediateFieldDefinition(nameof(WixBundleTupleFields.Condition), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundleTupleFields.Tag), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundleTupleFields.Platform), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundleTupleFields.ParentName), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundleTupleFields.UpgradeCode), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundleTupleFields.BundleId), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundleTupleFields.ProviderKey), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundleTupleFields.PerMachine), IntermediateFieldType.Number), + }, + typeof(WixBundleTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum WixBundleTupleFields + { + Version, + Copyright, + Name, + AboutUrl, + DisableModify, + DisableRemove, + DisableRepair, + HelpTelephone, + HelpUrl, + Manufacturer, + UpdateUrl, + Compressed, + LogPrefixAndExtension, + IconSourceFile, + SplashScreenSourceFile, + Condition, + Tag, + Platform, + ParentName, + UpgradeCode, + BundleId, + ProviderKey, + PerMachine, + } + + public class WixBundleTuple : IntermediateTuple + { + public WixBundleTuple() : base(TupleDefinitions.WixBundle, null, null) + { + } + + public WixBundleTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixBundle, sourceLineNumber, id) + { + } + + public IntermediateField this[WixBundleTupleFields index] => this.Fields[(int)index]; + + public string Version + { + get => (string)this.Fields[(int)WixBundleTupleFields.Version]?.Value; + set => this.Set((int)WixBundleTupleFields.Version, value); + } + + public string Copyright + { + get => (string)this.Fields[(int)WixBundleTupleFields.Copyright]?.Value; + set => this.Set((int)WixBundleTupleFields.Copyright, value); + } + + public string Name + { + get => (string)this.Fields[(int)WixBundleTupleFields.Name]?.Value; + set => this.Set((int)WixBundleTupleFields.Name, value); + } + + public string AboutUrl + { + get => (string)this.Fields[(int)WixBundleTupleFields.AboutUrl]?.Value; + set => this.Set((int)WixBundleTupleFields.AboutUrl, value); + } + + public int DisableModify + { + get => (int)this.Fields[(int)WixBundleTupleFields.DisableModify]?.Value; + set => this.Set((int)WixBundleTupleFields.DisableModify, value); + } + + public int DisableRemove + { + get => (int)this.Fields[(int)WixBundleTupleFields.DisableRemove]?.Value; + set => this.Set((int)WixBundleTupleFields.DisableRemove, value); + } + + public int DisableRepair + { + get => (int)this.Fields[(int)WixBundleTupleFields.DisableRepair]?.Value; + set => this.Set((int)WixBundleTupleFields.DisableRepair, value); + } + + public string HelpTelephone + { + get => (string)this.Fields[(int)WixBundleTupleFields.HelpTelephone]?.Value; + set => this.Set((int)WixBundleTupleFields.HelpTelephone, value); + } + + public string HelpUrl + { + get => (string)this.Fields[(int)WixBundleTupleFields.HelpUrl]?.Value; + set => this.Set((int)WixBundleTupleFields.HelpUrl, value); + } + + public string Manufacturer + { + get => (string)this.Fields[(int)WixBundleTupleFields.Manufacturer]?.Value; + set => this.Set((int)WixBundleTupleFields.Manufacturer, value); + } + + public string UpdateUrl + { + get => (string)this.Fields[(int)WixBundleTupleFields.UpdateUrl]?.Value; + set => this.Set((int)WixBundleTupleFields.UpdateUrl, value); + } + + public int Compressed + { + get => (int)this.Fields[(int)WixBundleTupleFields.Compressed]?.Value; + set => this.Set((int)WixBundleTupleFields.Compressed, value); + } + + public string LogPrefixAndExtension + { + get => (string)this.Fields[(int)WixBundleTupleFields.LogPrefixAndExtension]?.Value; + set => this.Set((int)WixBundleTupleFields.LogPrefixAndExtension, value); + } + + public string IconSourceFile + { + get => (string)this.Fields[(int)WixBundleTupleFields.IconSourceFile]?.Value; + set => this.Set((int)WixBundleTupleFields.IconSourceFile, value); + } + + public string SplashScreenSourceFile + { + get => (string)this.Fields[(int)WixBundleTupleFields.SplashScreenSourceFile]?.Value; + set => this.Set((int)WixBundleTupleFields.SplashScreenSourceFile, value); + } + + public string Condition + { + get => (string)this.Fields[(int)WixBundleTupleFields.Condition]?.Value; + set => this.Set((int)WixBundleTupleFields.Condition, value); + } + + public string Tag + { + get => (string)this.Fields[(int)WixBundleTupleFields.Tag]?.Value; + set => this.Set((int)WixBundleTupleFields.Tag, value); + } + + public string Platform + { + get => (string)this.Fields[(int)WixBundleTupleFields.Platform]?.Value; + set => this.Set((int)WixBundleTupleFields.Platform, value); + } + + public string ParentName + { + get => (string)this.Fields[(int)WixBundleTupleFields.ParentName]?.Value; + set => this.Set((int)WixBundleTupleFields.ParentName, value); + } + + public string UpgradeCode + { + get => (string)this.Fields[(int)WixBundleTupleFields.UpgradeCode]?.Value; + set => this.Set((int)WixBundleTupleFields.UpgradeCode, value); + } + + public string BundleId + { + get => (string)this.Fields[(int)WixBundleTupleFields.BundleId]?.Value; + set => this.Set((int)WixBundleTupleFields.BundleId, value); + } + + public string ProviderKey + { + get => (string)this.Fields[(int)WixBundleTupleFields.ProviderKey]?.Value; + set => this.Set((int)WixBundleTupleFields.ProviderKey, value); + } + + public int PerMachine + { + get => (int)this.Fields[(int)WixBundleTupleFields.PerMachine]?.Value; + set => this.Set((int)WixBundleTupleFields.PerMachine, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/WixBundleUpdateTuple.cs b/src/WixToolset.Data/Tuples/WixBundleUpdateTuple.cs new file mode 100644 index 00000000..2398b1da --- /dev/null +++ b/src/WixToolset.Data/Tuples/WixBundleUpdateTuple.cs @@ -0,0 +1,52 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition WixBundleUpdate = new IntermediateTupleDefinition( + TupleDefinitionType.WixBundleUpdate, + new[] + { + new IntermediateFieldDefinition(nameof(WixBundleUpdateTupleFields.Location), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundleUpdateTupleFields.Attributes), IntermediateFieldType.Number), + }, + typeof(WixBundleUpdateTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum WixBundleUpdateTupleFields + { + Location, + Attributes, + } + + public class WixBundleUpdateTuple : IntermediateTuple + { + public WixBundleUpdateTuple() : base(TupleDefinitions.WixBundleUpdate, null, null) + { + } + + public WixBundleUpdateTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixBundleUpdate,sourceLineNumber,id) + { + } + + public IntermediateField this[WixBundleUpdateTupleFields index] => this.Fields[(int)index]; + + public string Location + { + get => (string)this.Fields[(int)WixBundleUpdateTupleFields.Location]?.Value; + set => this.Set((int)WixBundleUpdateTupleFields.Location, value); + } + + public int Attributes + { + get => (int)this.Fields[(int)WixBundleUpdateTupleFields.Attributes]?.Value; + set => this.Set((int)WixBundleUpdateTupleFields.Attributes, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/WixBundleVariableTuple.cs b/src/WixToolset.Data/Tuples/WixBundleVariableTuple.cs new file mode 100644 index 00000000..c5724e6c --- /dev/null +++ b/src/WixToolset.Data/Tuples/WixBundleVariableTuple.cs @@ -0,0 +1,76 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition WixBundleVariable = new IntermediateTupleDefinition( + TupleDefinitionType.WixBundleVariable, + new[] + { + new IntermediateFieldDefinition(nameof(WixBundleVariableTupleFields.WixBundleVariable), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundleVariableTupleFields.Value), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundleVariableTupleFields.Type), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundleVariableTupleFields.Hidden), IntermediateFieldType.Bool), + new IntermediateFieldDefinition(nameof(WixBundleVariableTupleFields.Persisted), IntermediateFieldType.Bool), + }, + typeof(WixBundleVariableTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum WixBundleVariableTupleFields + { + WixBundleVariable, + Value, + Type, + Hidden, + Persisted, + } + + public class WixBundleVariableTuple : IntermediateTuple + { + public WixBundleVariableTuple() : base(TupleDefinitions.WixBundleVariable, null, null) + { + } + + public WixBundleVariableTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixBundleVariable, sourceLineNumber, id) + { + } + + public IntermediateField this[WixBundleVariableTupleFields index] => this.Fields[(int)index]; + + public string WixBundleVariable + { + get => (string)this.Fields[(int)WixBundleVariableTupleFields.WixBundleVariable]?.Value; + set => this.Set((int)WixBundleVariableTupleFields.WixBundleVariable, value); + } + + public string Value + { + get => (string)this.Fields[(int)WixBundleVariableTupleFields.Value]?.Value; + set => this.Set((int)WixBundleVariableTupleFields.Value, value); + } + + public string Type + { + get => (string)this.Fields[(int)WixBundleVariableTupleFields.Type]?.Value; + set => this.Set((int)WixBundleVariableTupleFields.Type, value); + } + + public bool Hidden + { + get => (bool)this.Fields[(int)WixBundleVariableTupleFields.Hidden]?.Value; + set => this.Set((int)WixBundleVariableTupleFields.Hidden, value); + } + + public bool Persisted + { + get => (bool)this.Fields[(int)WixBundleVariableTupleFields.Persisted]?.Value; + set => this.Set((int)WixBundleVariableTupleFields.Persisted, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/WixChainItemTuple.cs b/src/WixToolset.Data/Tuples/WixChainItemTuple.cs new file mode 100644 index 00000000..c77bd038 --- /dev/null +++ b/src/WixToolset.Data/Tuples/WixChainItemTuple.cs @@ -0,0 +1,44 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition WixChainItem = new IntermediateTupleDefinition( + TupleDefinitionType.WixChainItem, + new[] + { + new IntermediateFieldDefinition(nameof(WixChainItemTupleFields.Id), IntermediateFieldType.String), + }, + typeof(WixChainItemTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum WixChainItemTupleFields + { + Id, + } + + public class WixChainItemTuple : IntermediateTuple + { + public WixChainItemTuple() : base(TupleDefinitions.WixChainItem, null, null) + { + } + + public WixChainItemTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixChainItem, sourceLineNumber, id) + { + } + + public IntermediateField this[WixChainItemTupleFields index] => this.Fields[(int)index]; + + public string Id + { + get => (string)this.Fields[(int)WixChainItemTupleFields.Id]?.Value; + set => this.Set((int)WixChainItemTupleFields.Id, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/WixChainTuple.cs b/src/WixToolset.Data/Tuples/WixChainTuple.cs new file mode 100644 index 00000000..d3ae2f4a --- /dev/null +++ b/src/WixToolset.Data/Tuples/WixChainTuple.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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition WixChain = new IntermediateTupleDefinition( + TupleDefinitionType.WixChain, + new[] + { + new IntermediateFieldDefinition(nameof(WixChainTupleFields.Attributes), IntermediateFieldType.Number), + }, + typeof(WixChainTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + using System; + + public enum WixChainTupleFields + { + Attributes, + } + + [Flags] + public enum WixChainAttributes + { + None = 0x0, + DisableRollback = 0x1, + DisableSystemRestore = 0x2, + ParallelCache = 0x4, + } + + public class WixChainTuple : IntermediateTuple + { + public WixChainTuple() : base(TupleDefinitions.WixChain, null, null) + { + } + + public WixChainTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixChain, sourceLineNumber, id) + { + } + + public IntermediateField this[WixChainTupleFields index] => this.Fields[(int)index]; + + public WixChainAttributes Attributes + { + get => (WixChainAttributes)(int)this.Fields[(int)WixChainTupleFields.Attributes]?.Value; + set => this.Set((int)WixChainTupleFields.Attributes, (int)value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/WixComplexReferenceTuple.cs b/src/WixToolset.Data/Tuples/WixComplexReferenceTuple.cs new file mode 100644 index 00000000..46de9aa9 --- /dev/null +++ b/src/WixToolset.Data/Tuples/WixComplexReferenceTuple.cs @@ -0,0 +1,86 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition WixComplexReference = new IntermediateTupleDefinition( + TupleDefinitionType.WixComplexReference, + new[] + { + new IntermediateFieldDefinition(nameof(WixComplexReferenceTupleFields.Parent), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixComplexReferenceTupleFields.ParentAttributes), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixComplexReferenceTupleFields.ParentLanguage), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixComplexReferenceTupleFields.Child), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixComplexReferenceTupleFields.ChildAttributes), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixComplexReferenceTupleFields.Attributes), IntermediateFieldType.Bool), + }, + typeof(WixComplexReferenceTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + using System; + + public enum WixComplexReferenceTupleFields + { + Parent, + ParentAttributes, + ParentLanguage, + Child, + ChildAttributes, + Attributes, + } + + public class WixComplexReferenceTuple : IntermediateTuple + { + public WixComplexReferenceTuple() : base(TupleDefinitions.WixComplexReference, null, null) + { + } + + public WixComplexReferenceTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixComplexReference, sourceLineNumber, id) + { + } + + public IntermediateField this[WixComplexReferenceTupleFields index] => this.Fields[(int)index]; + + public string Parent + { + get => (string)this.Fields[(int)WixComplexReferenceTupleFields.Parent]?.Value; + set => this.Set((int)WixComplexReferenceTupleFields.Parent, value); + } + + public ComplexReferenceParentType ParentType + { + get => (ComplexReferenceParentType)Enum.Parse(typeof(ComplexReferenceParentType), (string)this.Fields[(int)WixComplexReferenceTupleFields.ParentAttributes]?.Value, true); + set => this.Set((int)WixComplexReferenceTupleFields.ParentAttributes, value.ToString()); + } + + public string ParentLanguage + { + get => (string)this.Fields[(int)WixComplexReferenceTupleFields.ParentLanguage]?.Value; + set => this.Set((int)WixComplexReferenceTupleFields.ParentLanguage, value); + } + + public string Child + { + get => (string)this.Fields[(int)WixComplexReferenceTupleFields.Child]?.Value; + set => this.Set((int)WixComplexReferenceTupleFields.Child, value); + } + + public ComplexReferenceChildType ChildType + { + get => (ComplexReferenceChildType)Enum.Parse(typeof(ComplexReferenceChildType), (string)this.Fields[(int)WixComplexReferenceTupleFields.ChildAttributes]?.Value, true); + set => this.Set((int)WixComplexReferenceTupleFields.ChildAttributes, value.ToString()); + } + + public bool IsPrimary + { + get => (bool)this.Fields[(int)WixComplexReferenceTupleFields.Attributes]?.Value; + set => this.Set((int)WixComplexReferenceTupleFields.Attributes, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/WixComponentGroupTuple.cs b/src/WixToolset.Data/Tuples/WixComponentGroupTuple.cs new file mode 100644 index 00000000..f4118277 --- /dev/null +++ b/src/WixToolset.Data/Tuples/WixComponentGroupTuple.cs @@ -0,0 +1,44 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition WixComponentGroup = new IntermediateTupleDefinition( + TupleDefinitionType.WixComponentGroup, + new[] + { + new IntermediateFieldDefinition(nameof(WixComponentGroupTupleFields.WixComponentGroup), IntermediateFieldType.String), + }, + typeof(WixComponentGroupTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum WixComponentGroupTupleFields + { + WixComponentGroup, + } + + public class WixComponentGroupTuple : IntermediateTuple + { + public WixComponentGroupTuple() : base(TupleDefinitions.WixComponentGroup, null, null) + { + } + + public WixComponentGroupTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixComponentGroup, sourceLineNumber, id) + { + } + + public IntermediateField this[WixComponentGroupTupleFields index] => this.Fields[(int)index]; + + public string WixComponentGroup + { + get => (string)this.Fields[(int)WixComponentGroupTupleFields.WixComponentGroup]?.Value; + set => this.Set((int)WixComponentGroupTupleFields.WixComponentGroup, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/WixComponentSearchTuple.cs b/src/WixToolset.Data/Tuples/WixComponentSearchTuple.cs new file mode 100644 index 00000000..7aad13d2 --- /dev/null +++ b/src/WixToolset.Data/Tuples/WixComponentSearchTuple.cs @@ -0,0 +1,68 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition WixComponentSearch = new IntermediateTupleDefinition( + TupleDefinitionType.WixComponentSearch, + new[] + { + new IntermediateFieldDefinition(nameof(WixComponentSearchTupleFields.WixSearch_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixComponentSearchTupleFields.Guid), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixComponentSearchTupleFields.ProductCode), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixComponentSearchTupleFields.Attributes), IntermediateFieldType.Number), + }, + typeof(WixComponentSearchTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum WixComponentSearchTupleFields + { + WixSearch_, + Guid, + ProductCode, + Attributes, + } + + public class WixComponentSearchTuple : IntermediateTuple + { + public WixComponentSearchTuple() : base(TupleDefinitions.WixComponentSearch, null, null) + { + } + + public WixComponentSearchTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixComponentSearch, sourceLineNumber, id) + { + } + + public IntermediateField this[WixComponentSearchTupleFields index] => this.Fields[(int)index]; + + public string WixSearch_ + { + get => (string)this.Fields[(int)WixComponentSearchTupleFields.WixSearch_]?.Value; + set => this.Set((int)WixComponentSearchTupleFields.WixSearch_, value); + } + + public string Guid + { + get => (string)this.Fields[(int)WixComponentSearchTupleFields.Guid]?.Value; + set => this.Set((int)WixComponentSearchTupleFields.Guid, value); + } + + public string ProductCode + { + get => (string)this.Fields[(int)WixComponentSearchTupleFields.ProductCode]?.Value; + set => this.Set((int)WixComponentSearchTupleFields.ProductCode, value); + } + + public int Attributes + { + get => (int)this.Fields[(int)WixComponentSearchTupleFields.Attributes]?.Value; + set => this.Set((int)WixComponentSearchTupleFields.Attributes, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/WixControlTuple.cs b/src/WixToolset.Data/Tuples/WixControlTuple.cs new file mode 100644 index 00000000..c86490fb --- /dev/null +++ b/src/WixToolset.Data/Tuples/WixControlTuple.cs @@ -0,0 +1,60 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition WixControl = new IntermediateTupleDefinition( + TupleDefinitionType.WixControl, + new[] + { + new IntermediateFieldDefinition(nameof(WixControlTupleFields.Dialog_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixControlTupleFields.Control_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixControlTupleFields.SourceFile), IntermediateFieldType.Path), + }, + typeof(WixControlTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum WixControlTupleFields + { + Dialog_, + Control_, + SourceFile, + } + + public class WixControlTuple : IntermediateTuple + { + public WixControlTuple() : base(TupleDefinitions.WixControl, null, null) + { + } + + public WixControlTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixControl, sourceLineNumber, id) + { + } + + public IntermediateField this[WixControlTupleFields index] => this.Fields[(int)index]; + + public string Dialog_ + { + get => (string)this.Fields[(int)WixControlTupleFields.Dialog_]?.Value; + set => this.Set((int)WixControlTupleFields.Dialog_, value); + } + + public string Control_ + { + get => (string)this.Fields[(int)WixControlTupleFields.Control_]?.Value; + set => this.Set((int)WixControlTupleFields.Control_, value); + } + + public string SourceFile + { + get => (string)this.Fields[(int)WixControlTupleFields.SourceFile]?.Value; + set => this.Set((int)WixControlTupleFields.SourceFile, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/WixCustomRowTuple.cs b/src/WixToolset.Data/Tuples/WixCustomRowTuple.cs new file mode 100644 index 00000000..c7ab0b0b --- /dev/null +++ b/src/WixToolset.Data/Tuples/WixCustomRowTuple.cs @@ -0,0 +1,52 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition WixCustomRow = new IntermediateTupleDefinition( + TupleDefinitionType.WixCustomRow, + new[] + { + new IntermediateFieldDefinition(nameof(WixCustomRowTupleFields.Table), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixCustomRowTupleFields.FieldData), IntermediateFieldType.String), + }, + typeof(WixCustomRowTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum WixCustomRowTupleFields + { + Table, + FieldData, + } + + public class WixCustomRowTuple : IntermediateTuple + { + public WixCustomRowTuple() : base(TupleDefinitions.WixCustomRow, null, null) + { + } + + public WixCustomRowTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixCustomRow, sourceLineNumber, id) + { + } + + public IntermediateField this[WixCustomRowTupleFields index] => this.Fields[(int)index]; + + public string Table + { + get => (string)this.Fields[(int)WixCustomRowTupleFields.Table]?.Value; + set => this.Set((int)WixCustomRowTupleFields.Table, value); + } + + public string FieldData + { + get => (string)this.Fields[(int)WixCustomRowTupleFields.FieldData]?.Value; + set => this.Set((int)WixCustomRowTupleFields.FieldData, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/WixCustomTableTuple.cs b/src/WixToolset.Data/Tuples/WixCustomTableTuple.cs new file mode 100644 index 00000000..58266aff --- /dev/null +++ b/src/WixToolset.Data/Tuples/WixCustomTableTuple.cs @@ -0,0 +1,148 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition WixCustomTable = new IntermediateTupleDefinition( + TupleDefinitionType.WixCustomTable, + new[] + { + new IntermediateFieldDefinition(nameof(WixCustomTableTupleFields.Table), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixCustomTableTupleFields.ColumnCount), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(WixCustomTableTupleFields.ColumnNames), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixCustomTableTupleFields.ColumnTypes), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixCustomTableTupleFields.PrimaryKeys), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixCustomTableTupleFields.MinValues), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixCustomTableTupleFields.MaxValues), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixCustomTableTupleFields.KeyTables), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixCustomTableTupleFields.KeyColumns), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixCustomTableTupleFields.Categories), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixCustomTableTupleFields.Sets), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixCustomTableTupleFields.Descriptions), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixCustomTableTupleFields.Modularizations), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixCustomTableTupleFields.BootstrapperApplicationData), IntermediateFieldType.Number), + }, + typeof(WixCustomTableTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum WixCustomTableTupleFields + { + Table, + ColumnCount, + ColumnNames, + ColumnTypes, + PrimaryKeys, + MinValues, + MaxValues, + KeyTables, + KeyColumns, + Categories, + Sets, + Descriptions, + Modularizations, + BootstrapperApplicationData, + } + + public class WixCustomTableTuple : IntermediateTuple + { + public WixCustomTableTuple() : base(TupleDefinitions.WixCustomTable, null, null) + { + } + + public WixCustomTableTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixCustomTable, sourceLineNumber, id) + { + } + + public IntermediateField this[WixCustomTableTupleFields index] => this.Fields[(int)index]; + + public string Table + { + get => (string)this.Fields[(int)WixCustomTableTupleFields.Table]?.Value; + set => this.Set((int)WixCustomTableTupleFields.Table, value); + } + + public int ColumnCount + { + get => (int)this.Fields[(int)WixCustomTableTupleFields.ColumnCount]?.Value; + set => this.Set((int)WixCustomTableTupleFields.ColumnCount, value); + } + + public string ColumnNames + { + get => (string)this.Fields[(int)WixCustomTableTupleFields.ColumnNames]?.Value; + set => this.Set((int)WixCustomTableTupleFields.ColumnNames, value); + } + + public string ColumnTypes + { + get => (string)this.Fields[(int)WixCustomTableTupleFields.ColumnTypes]?.Value; + set => this.Set((int)WixCustomTableTupleFields.ColumnTypes, value); + } + + public string PrimaryKeys + { + get => (string)this.Fields[(int)WixCustomTableTupleFields.PrimaryKeys]?.Value; + set => this.Set((int)WixCustomTableTupleFields.PrimaryKeys, value); + } + + public string MinValues + { + get => (string)this.Fields[(int)WixCustomTableTupleFields.MinValues]?.Value; + set => this.Set((int)WixCustomTableTupleFields.MinValues, value); + } + + public string MaxValues + { + get => (string)this.Fields[(int)WixCustomTableTupleFields.MaxValues]?.Value; + set => this.Set((int)WixCustomTableTupleFields.MaxValues, value); + } + + public string KeyTables + { + get => (string)this.Fields[(int)WixCustomTableTupleFields.KeyTables]?.Value; + set => this.Set((int)WixCustomTableTupleFields.KeyTables, value); + } + + public string KeyColumns + { + get => (string)this.Fields[(int)WixCustomTableTupleFields.KeyColumns]?.Value; + set => this.Set((int)WixCustomTableTupleFields.KeyColumns, value); + } + + public string Categories + { + get => (string)this.Fields[(int)WixCustomTableTupleFields.Categories]?.Value; + set => this.Set((int)WixCustomTableTupleFields.Categories, value); + } + + public string Sets + { + get => (string)this.Fields[(int)WixCustomTableTupleFields.Sets]?.Value; + set => this.Set((int)WixCustomTableTupleFields.Sets, value); + } + + public string Descriptions + { + get => (string)this.Fields[(int)WixCustomTableTupleFields.Descriptions]?.Value; + set => this.Set((int)WixCustomTableTupleFields.Descriptions, value); + } + + public string Modularizations + { + get => (string)this.Fields[(int)WixCustomTableTupleFields.Modularizations]?.Value; + set => this.Set((int)WixCustomTableTupleFields.Modularizations, value); + } + + public int BootstrapperApplicationData + { + get => (int)this.Fields[(int)WixCustomTableTupleFields.BootstrapperApplicationData]?.Value; + set => this.Set((int)WixCustomTableTupleFields.BootstrapperApplicationData, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/WixDeltaPatchFileTuple.cs b/src/WixToolset.Data/Tuples/WixDeltaPatchFileTuple.cs new file mode 100644 index 00000000..68f327f4 --- /dev/null +++ b/src/WixToolset.Data/Tuples/WixDeltaPatchFileTuple.cs @@ -0,0 +1,84 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition WixDeltaPatchFile = new IntermediateTupleDefinition( + TupleDefinitionType.WixDeltaPatchFile, + new[] + { + new IntermediateFieldDefinition(nameof(WixDeltaPatchFileTupleFields.File_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixDeltaPatchFileTupleFields.RetainLengths), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixDeltaPatchFileTupleFields.IgnoreOffsets), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixDeltaPatchFileTupleFields.IgnoreLengths), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixDeltaPatchFileTupleFields.RetainOffsets), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixDeltaPatchFileTupleFields.SymbolPaths), IntermediateFieldType.String), + }, + typeof(WixDeltaPatchFileTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum WixDeltaPatchFileTupleFields + { + File_, + RetainLengths, + IgnoreOffsets, + IgnoreLengths, + RetainOffsets, + SymbolPaths, + } + + public class WixDeltaPatchFileTuple : IntermediateTuple + { + public WixDeltaPatchFileTuple() : base(TupleDefinitions.WixDeltaPatchFile, null, null) + { + } + + public WixDeltaPatchFileTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixDeltaPatchFile, sourceLineNumber, id) + { + } + + public IntermediateField this[WixDeltaPatchFileTupleFields index] => this.Fields[(int)index]; + + public string File_ + { + get => (string)this.Fields[(int)WixDeltaPatchFileTupleFields.File_]?.Value; + set => this.Set((int)WixDeltaPatchFileTupleFields.File_, value); + } + + public string RetainLengths + { + get => (string)this.Fields[(int)WixDeltaPatchFileTupleFields.RetainLengths]?.Value; + set => this.Set((int)WixDeltaPatchFileTupleFields.RetainLengths, value); + } + + public string IgnoreOffsets + { + get => (string)this.Fields[(int)WixDeltaPatchFileTupleFields.IgnoreOffsets]?.Value; + set => this.Set((int)WixDeltaPatchFileTupleFields.IgnoreOffsets, value); + } + + public string IgnoreLengths + { + get => (string)this.Fields[(int)WixDeltaPatchFileTupleFields.IgnoreLengths]?.Value; + set => this.Set((int)WixDeltaPatchFileTupleFields.IgnoreLengths, value); + } + + public string RetainOffsets + { + get => (string)this.Fields[(int)WixDeltaPatchFileTupleFields.RetainOffsets]?.Value; + set => this.Set((int)WixDeltaPatchFileTupleFields.RetainOffsets, value); + } + + public string SymbolPaths + { + get => (string)this.Fields[(int)WixDeltaPatchFileTupleFields.SymbolPaths]?.Value; + set => this.Set((int)WixDeltaPatchFileTupleFields.SymbolPaths, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/WixDeltaPatchSymbolPathsTuple.cs b/src/WixToolset.Data/Tuples/WixDeltaPatchSymbolPathsTuple.cs new file mode 100644 index 00000000..39747be5 --- /dev/null +++ b/src/WixToolset.Data/Tuples/WixDeltaPatchSymbolPathsTuple.cs @@ -0,0 +1,75 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +using System; + +namespace WixToolset.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition WixDeltaPatchSymbolPaths = new IntermediateTupleDefinition( + TupleDefinitionType.WixDeltaPatchSymbolPaths, + new[] + { + new IntermediateFieldDefinition(nameof(WixDeltaPatchSymbolPathsTupleFields.Id), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixDeltaPatchSymbolPathsTupleFields.Type), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixDeltaPatchSymbolPathsTupleFields.SymbolPaths), IntermediateFieldType.String), + }, + typeof(WixDeltaPatchSymbolPathsTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum WixDeltaPatchSymbolPathsTupleFields + { + Id, + Type, + SymbolPaths, + } + + /// + /// The types that the WixDeltaPatchSymbolPaths table can hold. + /// + /// The order of these values is important since WixDeltaPatchSymbolPaths are sorted by this type. + public enum SymbolPathType + { + File, + Component, + Directory, + Media, + Product + }; + + public class WixDeltaPatchSymbolPathsTuple : IntermediateTuple + { + public WixDeltaPatchSymbolPathsTuple() : base(TupleDefinitions.WixDeltaPatchSymbolPaths, null, null) + { + } + + public WixDeltaPatchSymbolPathsTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixDeltaPatchSymbolPaths, sourceLineNumber, id) + { + } + + public IntermediateField this[WixDeltaPatchSymbolPathsTupleFields index] => this.Fields[(int)index]; + + public string Id + { + get => (string)this.Fields[(int)WixDeltaPatchSymbolPathsTupleFields.Id]?.Value; + set => this.Set((int)WixDeltaPatchSymbolPathsTupleFields.Id, value); + } + + public SymbolPathType Type + { + get => (SymbolPathType)Enum.Parse(typeof(SymbolPathType), (string)this.Fields[(int)WixDeltaPatchSymbolPathsTupleFields.Type]?.Value, true); + set => this.Set((int)WixDeltaPatchSymbolPathsTupleFields.Type, value.ToString()); + } + + public string SymbolPaths + { + get => (string)this.Fields[(int)WixDeltaPatchSymbolPathsTupleFields.SymbolPaths]?.Value; + set => this.Set((int)WixDeltaPatchSymbolPathsTupleFields.SymbolPaths, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/WixDirectoryTuple.cs b/src/WixToolset.Data/Tuples/WixDirectoryTuple.cs new file mode 100644 index 00000000..ce706dc4 --- /dev/null +++ b/src/WixToolset.Data/Tuples/WixDirectoryTuple.cs @@ -0,0 +1,52 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition WixDirectory = new IntermediateTupleDefinition( + TupleDefinitionType.WixDirectory, + new[] + { + new IntermediateFieldDefinition(nameof(WixDirectoryTupleFields.Directory_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixDirectoryTupleFields.ComponentGuidGenerationSeed), IntermediateFieldType.String), + }, + typeof(WixDirectoryTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum WixDirectoryTupleFields + { + Directory_, + ComponentGuidGenerationSeed, + } + + public class WixDirectoryTuple : IntermediateTuple + { + public WixDirectoryTuple() : base(TupleDefinitions.WixDirectory, null, null) + { + } + + public WixDirectoryTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixDirectory, sourceLineNumber, id) + { + } + + public IntermediateField this[WixDirectoryTupleFields index] => this.Fields[(int)index]; + + public string Directory_ + { + get => (string)this.Fields[(int)WixDirectoryTupleFields.Directory_]?.Value; + set => this.Set((int)WixDirectoryTupleFields.Directory_, value); + } + + public string ComponentGuidGenerationSeed + { + get => (string)this.Fields[(int)WixDirectoryTupleFields.ComponentGuidGenerationSeed]?.Value; + set => this.Set((int)WixDirectoryTupleFields.ComponentGuidGenerationSeed, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/WixEnsureTableTuple.cs b/src/WixToolset.Data/Tuples/WixEnsureTableTuple.cs new file mode 100644 index 00000000..cc80a5d9 --- /dev/null +++ b/src/WixToolset.Data/Tuples/WixEnsureTableTuple.cs @@ -0,0 +1,44 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition WixEnsureTable = new IntermediateTupleDefinition( + TupleDefinitionType.WixEnsureTable, + new[] + { + new IntermediateFieldDefinition(nameof(WixEnsureTableTupleFields.Table), IntermediateFieldType.String), + }, + typeof(WixEnsureTableTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum WixEnsureTableTupleFields + { + Table, + } + + public class WixEnsureTableTuple : IntermediateTuple + { + public WixEnsureTableTuple() : base(TupleDefinitions.WixEnsureTable, null, null) + { + } + + public WixEnsureTableTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixEnsureTable, sourceLineNumber, id) + { + } + + public IntermediateField this[WixEnsureTableTupleFields index] => this.Fields[(int)index]; + + public string Table + { + get => (string)this.Fields[(int)WixEnsureTableTupleFields.Table]?.Value; + set => this.Set((int)WixEnsureTableTupleFields.Table, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/WixFeatureGroupTuple.cs b/src/WixToolset.Data/Tuples/WixFeatureGroupTuple.cs new file mode 100644 index 00000000..20e88ce8 --- /dev/null +++ b/src/WixToolset.Data/Tuples/WixFeatureGroupTuple.cs @@ -0,0 +1,44 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition WixFeatureGroup = new IntermediateTupleDefinition( + TupleDefinitionType.WixFeatureGroup, + new[] + { + new IntermediateFieldDefinition(nameof(WixFeatureGroupTupleFields.WixFeatureGroup), IntermediateFieldType.String), + }, + typeof(WixFeatureGroupTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum WixFeatureGroupTupleFields + { + WixFeatureGroup, + } + + public class WixFeatureGroupTuple : IntermediateTuple + { + public WixFeatureGroupTuple() : base(TupleDefinitions.WixFeatureGroup, null, null) + { + } + + public WixFeatureGroupTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixFeatureGroup, sourceLineNumber, id) + { + } + + public IntermediateField this[WixFeatureGroupTupleFields index] => this.Fields[(int)index]; + + public string WixFeatureGroup + { + get => (string)this.Fields[(int)WixFeatureGroupTupleFields.WixFeatureGroup]?.Value; + set => this.Set((int)WixFeatureGroupTupleFields.WixFeatureGroup, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/WixFeatureModulesTuple.cs b/src/WixToolset.Data/Tuples/WixFeatureModulesTuple.cs new file mode 100644 index 00000000..23524b1d --- /dev/null +++ b/src/WixToolset.Data/Tuples/WixFeatureModulesTuple.cs @@ -0,0 +1,52 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition WixFeatureModules = new IntermediateTupleDefinition( + TupleDefinitionType.WixFeatureModules, + new[] + { + new IntermediateFieldDefinition(nameof(WixFeatureModulesTupleFields.Feature_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixFeatureModulesTupleFields.WixMerge_), IntermediateFieldType.String), + }, + typeof(WixFeatureModulesTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum WixFeatureModulesTupleFields + { + Feature_, + WixMerge_, + } + + public class WixFeatureModulesTuple : IntermediateTuple + { + public WixFeatureModulesTuple() : base(TupleDefinitions.WixFeatureModules, null, null) + { + } + + public WixFeatureModulesTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixFeatureModules, sourceLineNumber, id) + { + } + + public IntermediateField this[WixFeatureModulesTupleFields index] => this.Fields[(int)index]; + + public string Feature_ + { + get => (string)this.Fields[(int)WixFeatureModulesTupleFields.Feature_]?.Value; + set => this.Set((int)WixFeatureModulesTupleFields.Feature_, value); + } + + public string WixMerge_ + { + get => (string)this.Fields[(int)WixFeatureModulesTupleFields.WixMerge_]?.Value; + set => this.Set((int)WixFeatureModulesTupleFields.WixMerge_, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/WixFileSearchTuple.cs b/src/WixToolset.Data/Tuples/WixFileSearchTuple.cs new file mode 100644 index 00000000..62d19ec8 --- /dev/null +++ b/src/WixToolset.Data/Tuples/WixFileSearchTuple.cs @@ -0,0 +1,116 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition WixFileSearch = new IntermediateTupleDefinition( + TupleDefinitionType.WixFileSearch, + new[] + { + new IntermediateFieldDefinition(nameof(WixFileSearchTupleFields.WixSearch_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixFileSearchTupleFields.Path), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixFileSearchTupleFields.MinVersion), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixFileSearchTupleFields.MaxVersion), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixFileSearchTupleFields.MinSize), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(WixFileSearchTupleFields.MaxSize), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(WixFileSearchTupleFields.MinDate), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(WixFileSearchTupleFields.MaxDate), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(WixFileSearchTupleFields.Languages), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixFileSearchTupleFields.Attributes), IntermediateFieldType.Number), + }, + typeof(WixFileSearchTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum WixFileSearchTupleFields + { + WixSearch_, + Path, + MinVersion, + MaxVersion, + MinSize, + MaxSize, + MinDate, + MaxDate, + Languages, + Attributes, + } + + public class WixFileSearchTuple : IntermediateTuple + { + public WixFileSearchTuple() : base(TupleDefinitions.WixFileSearch, null, null) + { + } + + public WixFileSearchTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixFileSearch, sourceLineNumber, id) + { + } + + public IntermediateField this[WixFileSearchTupleFields index] => this.Fields[(int)index]; + + public string WixSearch_ + { + get => (string)this.Fields[(int)WixFileSearchTupleFields.WixSearch_]?.Value; + set => this.Set((int)WixFileSearchTupleFields.WixSearch_, value); + } + + public string Path + { + get => (string)this.Fields[(int)WixFileSearchTupleFields.Path]?.Value; + set => this.Set((int)WixFileSearchTupleFields.Path, value); + } + + public string MinVersion + { + get => (string)this.Fields[(int)WixFileSearchTupleFields.MinVersion]?.Value; + set => this.Set((int)WixFileSearchTupleFields.MinVersion, value); + } + + public string MaxVersion + { + get => (string)this.Fields[(int)WixFileSearchTupleFields.MaxVersion]?.Value; + set => this.Set((int)WixFileSearchTupleFields.MaxVersion, value); + } + + public int MinSize + { + get => (int)this.Fields[(int)WixFileSearchTupleFields.MinSize]?.Value; + set => this.Set((int)WixFileSearchTupleFields.MinSize, value); + } + + public int MaxSize + { + get => (int)this.Fields[(int)WixFileSearchTupleFields.MaxSize]?.Value; + set => this.Set((int)WixFileSearchTupleFields.MaxSize, value); + } + + public int MinDate + { + get => (int)this.Fields[(int)WixFileSearchTupleFields.MinDate]?.Value; + set => this.Set((int)WixFileSearchTupleFields.MinDate, value); + } + + public int MaxDate + { + get => (int)this.Fields[(int)WixFileSearchTupleFields.MaxDate]?.Value; + set => this.Set((int)WixFileSearchTupleFields.MaxDate, value); + } + + public string Languages + { + get => (string)this.Fields[(int)WixFileSearchTupleFields.Languages]?.Value; + set => this.Set((int)WixFileSearchTupleFields.Languages, value); + } + + public int Attributes + { + get => (int)this.Fields[(int)WixFileSearchTupleFields.Attributes]?.Value; + set => this.Set((int)WixFileSearchTupleFields.Attributes, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/WixFileTuple.cs b/src/WixToolset.Data/Tuples/WixFileTuple.cs new file mode 100644 index 00000000..5ffc5d7f --- /dev/null +++ b/src/WixToolset.Data/Tuples/WixFileTuple.cs @@ -0,0 +1,170 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition WixFile = new IntermediateTupleDefinition( + TupleDefinitionType.WixFile, + new[] + { + new IntermediateFieldDefinition(nameof(WixFileTupleFields.File_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixFileTupleFields.AssemblyType), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(WixFileTupleFields.File_AssemblyManifest), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixFileTupleFields.File_AssemblyApplication), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixFileTupleFields.Directory_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixFileTupleFields.DiskId), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(WixFileTupleFields.Source), IntermediateFieldType.Path), + new IntermediateFieldDefinition(nameof(WixFileTupleFields.ProcessorArchitecture), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixFileTupleFields.PatchGroup), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(WixFileTupleFields.Attributes), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(WixFileTupleFields.PatchAttributes), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(WixFileTupleFields.DeltaPatchHeaderSource), IntermediateFieldType.String), + }, + typeof(WixFileTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + using System; + + public enum WixFileTupleFields + { + File_, + AssemblyType, + File_AssemblyManifest, + File_AssemblyApplication, + Directory_, + DiskId, + Source, + ProcessorArchitecture, + PatchGroup, + Attributes, + PatchAttributes, + DeltaPatchHeaderSource, + } + + /// + /// Every file row has an assembly type. + /// + public enum FileAssemblyType + { + /// File is not an assembly. + NotAnAssembly, + + /// File is a Common Language Runtime Assembly. + DotNetAssembly, + + /// File is Win32 SxS assembly. + Win32Assembly, + } + + /// + /// PatchAttribute values + /// + [Flags] + public enum PatchAttributeType + { + None = 0, + + /// Prevents the updating of the file that is in fact changed in the upgraded image relative to the target images. + Ignore = 1, + + /// Set if the entire file should be installed rather than creating a binary patch. + IncludeWholeFile = 2, + + /// Set to indicate that the patch is non-vital. + AllowIgnoreOnError = 4, + + /// Allowed bits. + Defined = Ignore | IncludeWholeFile | AllowIgnoreOnError + } + + public class WixFileTuple : IntermediateTuple + { + public WixFileTuple() : base(TupleDefinitions.WixFile, null, null) + { + } + + public WixFileTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixFile, sourceLineNumber, id) + { + } + + public IntermediateField this[WixFileTupleFields index] => this.Fields[(int)index]; + + public string File_ + { + get => (string)this.Fields[(int)WixFileTupleFields.File_]?.Value; + set => this.Set((int)WixFileTupleFields.File_, value); + } + + public FileAssemblyType AssemblyType + { + get => (FileAssemblyType)(int)this.Fields[(int)WixFileTupleFields.AssemblyType]?.Value; + set => this.Set((int)WixFileTupleFields.AssemblyType, (int)value); + } + + public string File_AssemblyManifest + { + get => (string)this.Fields[(int)WixFileTupleFields.File_AssemblyManifest]?.Value; + set => this.Set((int)WixFileTupleFields.File_AssemblyManifest, value); + } + + public string File_AssemblyApplication + { + get => (string)this.Fields[(int)WixFileTupleFields.File_AssemblyApplication]?.Value; + set => this.Set((int)WixFileTupleFields.File_AssemblyApplication, value); + } + + public string Directory_ + { + get => (string)this.Fields[(int)WixFileTupleFields.Directory_]?.Value; + set => this.Set((int)WixFileTupleFields.Directory_, value); + } + + public int DiskId + { + get => (int)this.Fields[(int)WixFileTupleFields.DiskId]?.Value; + set => this.Set((int)WixFileTupleFields.DiskId, value); + } + + public string Source + { + get => (string)this.Fields[(int)WixFileTupleFields.Source]?.Value; + set => this.Set((int)WixFileTupleFields.Source, value); + } + + public string ProcessorArchitecture + { + get => (string)this.Fields[(int)WixFileTupleFields.ProcessorArchitecture]?.Value; + set => this.Set((int)WixFileTupleFields.ProcessorArchitecture, value); + } + + public int PatchGroup + { + get => (int)this.Fields[(int)WixFileTupleFields.PatchGroup]?.Value; + set => this.Set((int)WixFileTupleFields.PatchGroup, value); + } + + public int Attributes + { + get => (int)this.Fields[(int)WixFileTupleFields.Attributes]?.Value; + set => this.Set((int)WixFileTupleFields.Attributes, value); + } + + public PatchAttributeType PatchAttributes + { + get => (PatchAttributeType)(int)this.Fields[(int)WixFileTupleFields.PatchAttributes]?.Value; + set => this.Set((int)WixFileTupleFields.PatchAttributes, (int)value); + } + + public string DeltaPatchHeaderSource + { + get => (string)this.Fields[(int)WixFileTupleFields.DeltaPatchHeaderSource]?.Value; + set => this.Set((int)WixFileTupleFields.DeltaPatchHeaderSource, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/WixFragmentTuple.cs b/src/WixToolset.Data/Tuples/WixFragmentTuple.cs new file mode 100644 index 00000000..a5a59962 --- /dev/null +++ b/src/WixToolset.Data/Tuples/WixFragmentTuple.cs @@ -0,0 +1,44 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition WixFragment = new IntermediateTupleDefinition( + TupleDefinitionType.WixFragment, + new[] + { + new IntermediateFieldDefinition(nameof(WixFragmentTupleFields.WixFragment), IntermediateFieldType.String), + }, + typeof(WixFragmentTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum WixFragmentTupleFields + { + WixFragment, + } + + public class WixFragmentTuple : IntermediateTuple + { + public WixFragmentTuple() : base(TupleDefinitions.WixFragment, null, null) + { + } + + public WixFragmentTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixFragment, sourceLineNumber, id) + { + } + + public IntermediateField this[WixFragmentTupleFields index] => this.Fields[(int)index]; + + public string WixFragment + { + get => (string)this.Fields[(int)WixFragmentTupleFields.WixFragment]?.Value; + set => this.Set((int)WixFragmentTupleFields.WixFragment, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/WixGroupTuple.cs b/src/WixToolset.Data/Tuples/WixGroupTuple.cs new file mode 100644 index 00000000..be6bf7a4 --- /dev/null +++ b/src/WixToolset.Data/Tuples/WixGroupTuple.cs @@ -0,0 +1,70 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition WixGroup = new IntermediateTupleDefinition( + TupleDefinitionType.WixGroup, + new[] + { + new IntermediateFieldDefinition(nameof(WixGroupTupleFields.ParentId), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixGroupTupleFields.ParentType), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixGroupTupleFields.ChildId), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixGroupTupleFields.ChildType), IntermediateFieldType.String), + }, + typeof(WixGroupTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + using System; + + public enum WixGroupTupleFields + { + ParentId, + ParentType, + ChildId, + ChildType, + } + + public class WixGroupTuple : IntermediateTuple + { + public WixGroupTuple() : base(TupleDefinitions.WixGroup, null, null) + { + } + + public WixGroupTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixGroup, sourceLineNumber, id) + { + } + + public IntermediateField this[WixGroupTupleFields index] => this.Fields[(int)index]; + + public string ParentId + { + get => (string)this.Fields[(int)WixGroupTupleFields.ParentId]?.Value; + set => this.Set((int)WixGroupTupleFields.ParentId, value); + } + + public ComplexReferenceParentType ParentType + { + get => (ComplexReferenceParentType)Enum.Parse(typeof(ComplexReferenceParentType), (string)this.Fields[(int)WixGroupTupleFields.ParentType]?.Value, true); + set => this.Set((int)WixGroupTupleFields.ParentType, value.ToString()); + } + + public string ChildId + { + get => (string)this.Fields[(int)WixGroupTupleFields.ChildId]?.Value; + set => this.Set((int)WixGroupTupleFields.ChildId, value); + } + + public ComplexReferenceChildType ChildType + { + get => (ComplexReferenceChildType)Enum.Parse(typeof(ComplexReferenceChildType), (string)this.Fields[(int)WixGroupTupleFields.ChildType]?.Value, true); + set => this.Set((int)WixGroupTupleFields.ChildType, value.ToString()); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/WixInstanceComponentTuple.cs b/src/WixToolset.Data/Tuples/WixInstanceComponentTuple.cs new file mode 100644 index 00000000..b2fd18ca --- /dev/null +++ b/src/WixToolset.Data/Tuples/WixInstanceComponentTuple.cs @@ -0,0 +1,44 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition WixInstanceComponent = new IntermediateTupleDefinition( + TupleDefinitionType.WixInstanceComponent, + new[] + { + new IntermediateFieldDefinition(nameof(WixInstanceComponentTupleFields.Component_), IntermediateFieldType.String), + }, + typeof(WixInstanceComponentTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum WixInstanceComponentTupleFields + { + Component_, + } + + public class WixInstanceComponentTuple : IntermediateTuple + { + public WixInstanceComponentTuple() : base(TupleDefinitions.WixInstanceComponent, null, null) + { + } + + public WixInstanceComponentTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixInstanceComponent, sourceLineNumber, id) + { + } + + public IntermediateField this[WixInstanceComponentTupleFields index] => this.Fields[(int)index]; + + public string Component_ + { + get => (string)this.Fields[(int)WixInstanceComponentTupleFields.Component_]?.Value; + set => this.Set((int)WixInstanceComponentTupleFields.Component_, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/WixInstanceTransformsTuple.cs b/src/WixToolset.Data/Tuples/WixInstanceTransformsTuple.cs new file mode 100644 index 00000000..4f152ac6 --- /dev/null +++ b/src/WixToolset.Data/Tuples/WixInstanceTransformsTuple.cs @@ -0,0 +1,76 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition WixInstanceTransforms = new IntermediateTupleDefinition( + TupleDefinitionType.WixInstanceTransforms, + new[] + { + new IntermediateFieldDefinition(nameof(WixInstanceTransformsTupleFields.Id), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixInstanceTransformsTupleFields.PropertyId), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixInstanceTransformsTupleFields.ProductCode), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixInstanceTransformsTupleFields.ProductName), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixInstanceTransformsTupleFields.UpgradeCode), IntermediateFieldType.String), + }, + typeof(WixInstanceTransformsTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum WixInstanceTransformsTupleFields + { + Id, + PropertyId, + ProductCode, + ProductName, + UpgradeCode, + } + + public class WixInstanceTransformsTuple : IntermediateTuple + { + public WixInstanceTransformsTuple() : base(TupleDefinitions.WixInstanceTransforms, null, null) + { + } + + public WixInstanceTransformsTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixInstanceTransforms, sourceLineNumber, id) + { + } + + public IntermediateField this[WixInstanceTransformsTupleFields index] => this.Fields[(int)index]; + + public string Id + { + get => (string)this.Fields[(int)WixInstanceTransformsTupleFields.Id]?.Value; + set => this.Set((int)WixInstanceTransformsTupleFields.Id, value); + } + + public string PropertyId + { + get => (string)this.Fields[(int)WixInstanceTransformsTupleFields.PropertyId]?.Value; + set => this.Set((int)WixInstanceTransformsTupleFields.PropertyId, value); + } + + public string ProductCode + { + get => (string)this.Fields[(int)WixInstanceTransformsTupleFields.ProductCode]?.Value; + set => this.Set((int)WixInstanceTransformsTupleFields.ProductCode, value); + } + + public string ProductName + { + get => (string)this.Fields[(int)WixInstanceTransformsTupleFields.ProductName]?.Value; + set => this.Set((int)WixInstanceTransformsTupleFields.ProductName, value); + } + + public string UpgradeCode + { + get => (string)this.Fields[(int)WixInstanceTransformsTupleFields.UpgradeCode]?.Value; + set => this.Set((int)WixInstanceTransformsTupleFields.UpgradeCode, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/WixMediaTemplateTuple.cs b/src/WixToolset.Data/Tuples/WixMediaTemplateTuple.cs new file mode 100644 index 00000000..bc8d2515 --- /dev/null +++ b/src/WixToolset.Data/Tuples/WixMediaTemplateTuple.cs @@ -0,0 +1,86 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition WixMediaTemplate = new IntermediateTupleDefinition( + TupleDefinitionType.WixMediaTemplate, + new[] + { + new IntermediateFieldDefinition(nameof(WixMediaTemplateTupleFields.CabinetTemplate), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixMediaTemplateTupleFields.CompressionLevel), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(WixMediaTemplateTupleFields.DiskPrompt), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixMediaTemplateTupleFields.VolumeLabel), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixMediaTemplateTupleFields.MaximumUncompressedMediaSize), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(WixMediaTemplateTupleFields.MaximumCabinetSizeForLargeFileSplitting), IntermediateFieldType.Number), + }, + typeof(WixMediaTemplateTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + using System; + + public enum WixMediaTemplateTupleFields + { + CabinetTemplate, + CompressionLevel, + DiskPrompt, + VolumeLabel, + MaximumUncompressedMediaSize, + MaximumCabinetSizeForLargeFileSplitting, + } + + public class WixMediaTemplateTuple : IntermediateTuple + { + public WixMediaTemplateTuple() : base(TupleDefinitions.WixMediaTemplate, null, null) + { + } + + public WixMediaTemplateTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixMediaTemplate, sourceLineNumber, id) + { + } + + public IntermediateField this[WixMediaTemplateTupleFields index] => this.Fields[(int)index]; + + public string CabinetTemplate + { + get => (string)this.Fields[(int)WixMediaTemplateTupleFields.CabinetTemplate]?.Value; + set => this.Set((int)WixMediaTemplateTupleFields.CabinetTemplate, value); + } + + public CompressionLevel CompressionLevel + { + get => (CompressionLevel)Enum.Parse(typeof(CompressionLevel), (string)this.Fields[(int)WixMediaTupleFields.CompressionLevel]?.Value, true); + set => this.Set((int)WixMediaTupleFields.CompressionLevel, value.ToString()); + } + + public string DiskPrompt + { + get => (string)this.Fields[(int)WixMediaTemplateTupleFields.DiskPrompt]?.Value; + set => this.Set((int)WixMediaTemplateTupleFields.DiskPrompt, value); + } + + public string VolumeLabel + { + get => (string)this.Fields[(int)WixMediaTemplateTupleFields.VolumeLabel]?.Value; + set => this.Set((int)WixMediaTemplateTupleFields.VolumeLabel, value); + } + + public int MaximumUncompressedMediaSize + { + get => (int)this.Fields[(int)WixMediaTemplateTupleFields.MaximumUncompressedMediaSize]?.Value; + set => this.Set((int)WixMediaTemplateTupleFields.MaximumUncompressedMediaSize, value); + } + + public int MaximumCabinetSizeForLargeFileSplitting + { + get => (int)this.Fields[(int)WixMediaTemplateTupleFields.MaximumCabinetSizeForLargeFileSplitting]?.Value; + set => this.Set((int)WixMediaTemplateTupleFields.MaximumCabinetSizeForLargeFileSplitting, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/WixMediaTuple.cs b/src/WixToolset.Data/Tuples/WixMediaTuple.cs new file mode 100644 index 00000000..4da11de1 --- /dev/null +++ b/src/WixToolset.Data/Tuples/WixMediaTuple.cs @@ -0,0 +1,62 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition WixMedia = new IntermediateTupleDefinition( + TupleDefinitionType.WixMedia, + new[] + { + new IntermediateFieldDefinition(nameof(WixMediaTupleFields.DiskId_), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(WixMediaTupleFields.CompressionLevel), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(WixMediaTupleFields.Layout), IntermediateFieldType.String), + }, + typeof(WixMediaTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + using System; + + public enum WixMediaTupleFields + { + DiskId_, + CompressionLevel, + Layout, + } + + public class WixMediaTuple : IntermediateTuple + { + public WixMediaTuple() : base(TupleDefinitions.WixMedia, null, null) + { + } + + public WixMediaTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixMedia, sourceLineNumber, id) + { + } + + public IntermediateField this[WixMediaTupleFields index] => this.Fields[(int)index]; + + public int DiskId_ + { + get => (int)this.Fields[(int)WixMediaTupleFields.DiskId_]?.Value; + set => this.Set((int)WixMediaTupleFields.DiskId_, value); + } + + public CompressionLevel? CompressionLevel + { + get => Enum.TryParse((string)this.Fields[(int)WixMediaTupleFields.CompressionLevel]?.Value, true, out CompressionLevel value) ? value : (CompressionLevel?)null; + set => this.Set((int)WixMediaTupleFields.CompressionLevel, value?.ToString()); + } + + public string Layout + { + get => (string)this.Fields[(int)WixMediaTupleFields.Layout]?.Value; + set => this.Set((int)WixMediaTupleFields.Layout, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/WixMergeTuple.cs b/src/WixToolset.Data/Tuples/WixMergeTuple.cs new file mode 100644 index 00000000..602acc0e --- /dev/null +++ b/src/WixToolset.Data/Tuples/WixMergeTuple.cs @@ -0,0 +1,100 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition WixMerge = new IntermediateTupleDefinition( + TupleDefinitionType.WixMerge, + new[] + { + new IntermediateFieldDefinition(nameof(WixMergeTupleFields.WixMerge), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixMergeTupleFields.Language), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(WixMergeTupleFields.Directory_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixMergeTupleFields.SourceFile), IntermediateFieldType.Path), + new IntermediateFieldDefinition(nameof(WixMergeTupleFields.DiskId), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(WixMergeTupleFields.FileCompression), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(WixMergeTupleFields.ConfigurationData), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixMergeTupleFields.Feature_), IntermediateFieldType.String), + }, + typeof(WixMergeTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum WixMergeTupleFields + { + WixMerge, + Language, + Directory_, + SourceFile, + DiskId, + FileCompression, + ConfigurationData, + Feature_, + } + + public class WixMergeTuple : IntermediateTuple + { + public WixMergeTuple() : base(TupleDefinitions.WixMerge, null, null) + { + } + + public WixMergeTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixMerge, sourceLineNumber, id) + { + } + + public IntermediateField this[WixMergeTupleFields index] => this.Fields[(int)index]; + + public string WixMerge + { + get => (string)this.Fields[(int)WixMergeTupleFields.WixMerge]?.Value; + set => this.Set((int)WixMergeTupleFields.WixMerge, value); + } + + public int Language + { + get => (int)this.Fields[(int)WixMergeTupleFields.Language]?.Value; + set => this.Set((int)WixMergeTupleFields.Language, value); + } + + public string Directory_ + { + get => (string)this.Fields[(int)WixMergeTupleFields.Directory_]?.Value; + set => this.Set((int)WixMergeTupleFields.Directory_, value); + } + + public string SourceFile + { + get => (string)this.Fields[(int)WixMergeTupleFields.SourceFile]?.Value; + set => this.Set((int)WixMergeTupleFields.SourceFile, value); + } + + public int DiskId + { + get => (int)this.Fields[(int)WixMergeTupleFields.DiskId]?.Value; + set => this.Set((int)WixMergeTupleFields.DiskId, value); + } + + public int FileCompression + { + get => (int)this.Fields[(int)WixMergeTupleFields.FileCompression]?.Value; + set => this.Set((int)WixMergeTupleFields.FileCompression, value); + } + + public string ConfigurationData + { + get => (string)this.Fields[(int)WixMergeTupleFields.ConfigurationData]?.Value; + set => this.Set((int)WixMergeTupleFields.ConfigurationData, value); + } + + public string Feature_ + { + get => (string)this.Fields[(int)WixMergeTupleFields.Feature_]?.Value; + set => this.Set((int)WixMergeTupleFields.Feature_, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/WixOrderingTuple.cs b/src/WixToolset.Data/Tuples/WixOrderingTuple.cs new file mode 100644 index 00000000..fde295c1 --- /dev/null +++ b/src/WixToolset.Data/Tuples/WixOrderingTuple.cs @@ -0,0 +1,68 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition WixOrdering = new IntermediateTupleDefinition( + TupleDefinitionType.WixOrdering, + new[] + { + new IntermediateFieldDefinition(nameof(WixOrderingTupleFields.ItemType), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixOrderingTupleFields.ItemId_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixOrderingTupleFields.DependsOnType), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixOrderingTupleFields.DependsOnId_), IntermediateFieldType.String), + }, + typeof(WixOrderingTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum WixOrderingTupleFields + { + ItemType, + ItemId_, + DependsOnType, + DependsOnId_, + } + + public class WixOrderingTuple : IntermediateTuple + { + public WixOrderingTuple() : base(TupleDefinitions.WixOrdering, null, null) + { + } + + public WixOrderingTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixOrdering, sourceLineNumber, id) + { + } + + public IntermediateField this[WixOrderingTupleFields index] => this.Fields[(int)index]; + + public string ItemType + { + get => (string)this.Fields[(int)WixOrderingTupleFields.ItemType]?.Value; + set => this.Set((int)WixOrderingTupleFields.ItemType, value); + } + + public string ItemId_ + { + get => (string)this.Fields[(int)WixOrderingTupleFields.ItemId_]?.Value; + set => this.Set((int)WixOrderingTupleFields.ItemId_, value); + } + + public string DependsOnType + { + get => (string)this.Fields[(int)WixOrderingTupleFields.DependsOnType]?.Value; + set => this.Set((int)WixOrderingTupleFields.DependsOnType, value); + } + + public string DependsOnId_ + { + get => (string)this.Fields[(int)WixOrderingTupleFields.DependsOnId_]?.Value; + set => this.Set((int)WixOrderingTupleFields.DependsOnId_, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/WixPackageFeatureInfoTuple.cs b/src/WixToolset.Data/Tuples/WixPackageFeatureInfoTuple.cs new file mode 100644 index 00000000..03948efb --- /dev/null +++ b/src/WixToolset.Data/Tuples/WixPackageFeatureInfoTuple.cs @@ -0,0 +1,116 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition WixPackageFeatureInfo = new IntermediateTupleDefinition( + TupleDefinitionType.WixPackageFeatureInfo, + new[] + { + new IntermediateFieldDefinition(nameof(WixPackageFeatureInfoTupleFields.Package), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixPackageFeatureInfoTupleFields.Feature), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixPackageFeatureInfoTupleFields.Size), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixPackageFeatureInfoTupleFields.Parent), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixPackageFeatureInfoTupleFields.Title), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixPackageFeatureInfoTupleFields.Description), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixPackageFeatureInfoTupleFields.Display), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixPackageFeatureInfoTupleFields.Level), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixPackageFeatureInfoTupleFields.Directory), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixPackageFeatureInfoTupleFields.Attributes), IntermediateFieldType.String), + }, + typeof(WixPackageFeatureInfoTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum WixPackageFeatureInfoTupleFields + { + Package, + Feature, + Size, + Parent, + Title, + Description, + Display, + Level, + Directory, + Attributes, + } + + public class WixPackageFeatureInfoTuple : IntermediateTuple + { + public WixPackageFeatureInfoTuple() : base(TupleDefinitions.WixPackageFeatureInfo, null, null) + { + } + + public WixPackageFeatureInfoTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixPackageFeatureInfo, sourceLineNumber, id) + { + } + + public IntermediateField this[WixPackageFeatureInfoTupleFields index] => this.Fields[(int)index]; + + public string Package + { + get => (string)this.Fields[(int)WixPackageFeatureInfoTupleFields.Package]?.Value; + set => this.Set((int)WixPackageFeatureInfoTupleFields.Package, value); + } + + public string Feature + { + get => (string)this.Fields[(int)WixPackageFeatureInfoTupleFields.Feature]?.Value; + set => this.Set((int)WixPackageFeatureInfoTupleFields.Feature, value); + } + + public string Size + { + get => (string)this.Fields[(int)WixPackageFeatureInfoTupleFields.Size]?.Value; + set => this.Set((int)WixPackageFeatureInfoTupleFields.Size, value); + } + + public string Parent + { + get => (string)this.Fields[(int)WixPackageFeatureInfoTupleFields.Parent]?.Value; + set => this.Set((int)WixPackageFeatureInfoTupleFields.Parent, value); + } + + public string Title + { + get => (string)this.Fields[(int)WixPackageFeatureInfoTupleFields.Title]?.Value; + set => this.Set((int)WixPackageFeatureInfoTupleFields.Title, value); + } + + public string Description + { + get => (string)this.Fields[(int)WixPackageFeatureInfoTupleFields.Description]?.Value; + set => this.Set((int)WixPackageFeatureInfoTupleFields.Description, value); + } + + public string Display + { + get => (string)this.Fields[(int)WixPackageFeatureInfoTupleFields.Display]?.Value; + set => this.Set((int)WixPackageFeatureInfoTupleFields.Display, value); + } + + public string Level + { + get => (string)this.Fields[(int)WixPackageFeatureInfoTupleFields.Level]?.Value; + set => this.Set((int)WixPackageFeatureInfoTupleFields.Level, value); + } + + public string Directory + { + get => (string)this.Fields[(int)WixPackageFeatureInfoTupleFields.Directory]?.Value; + set => this.Set((int)WixPackageFeatureInfoTupleFields.Directory, value); + } + + public string Attributes + { + get => (string)this.Fields[(int)WixPackageFeatureInfoTupleFields.Attributes]?.Value; + set => this.Set((int)WixPackageFeatureInfoTupleFields.Attributes, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/WixPackagePropertiesTuple.cs b/src/WixToolset.Data/Tuples/WixPackagePropertiesTuple.cs new file mode 100644 index 00000000..4823409d --- /dev/null +++ b/src/WixToolset.Data/Tuples/WixPackagePropertiesTuple.cs @@ -0,0 +1,180 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition WixPackageProperties = new IntermediateTupleDefinition( + TupleDefinitionType.WixPackageProperties, + new[] + { + new IntermediateFieldDefinition(nameof(WixPackagePropertiesTupleFields.Package), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixPackagePropertiesTupleFields.Vital), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixPackagePropertiesTupleFields.DisplayName), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixPackagePropertiesTupleFields.Description), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixPackagePropertiesTupleFields.DownloadSize), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixPackagePropertiesTupleFields.PackageSize), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixPackagePropertiesTupleFields.InstalledSize), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixPackagePropertiesTupleFields.PackageType), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixPackagePropertiesTupleFields.Permanent), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixPackagePropertiesTupleFields.LogPathVariable), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixPackagePropertiesTupleFields.RollbackLogPathVariable), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixPackagePropertiesTupleFields.Compressed), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixPackagePropertiesTupleFields.DisplayInternalUI), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixPackagePropertiesTupleFields.ProductCode), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixPackagePropertiesTupleFields.UpgradeCode), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixPackagePropertiesTupleFields.Version), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixPackagePropertiesTupleFields.InstallCondition), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixPackagePropertiesTupleFields.Cache), IntermediateFieldType.String), + }, + typeof(WixPackagePropertiesTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum WixPackagePropertiesTupleFields + { + Package, + Vital, + DisplayName, + Description, + DownloadSize, + PackageSize, + InstalledSize, + PackageType, + Permanent, + LogPathVariable, + RollbackLogPathVariable, + Compressed, + DisplayInternalUI, + ProductCode, + UpgradeCode, + Version, + InstallCondition, + Cache, + } + + public class WixPackagePropertiesTuple : IntermediateTuple + { + public WixPackagePropertiesTuple() : base(TupleDefinitions.WixPackageProperties, null, null) + { + } + + public WixPackagePropertiesTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixPackageProperties, sourceLineNumber, id) + { + } + + public IntermediateField this[WixPackagePropertiesTupleFields index] => this.Fields[(int)index]; + + public string Package + { + get => (string)this.Fields[(int)WixPackagePropertiesTupleFields.Package]?.Value; + set => this.Set((int)WixPackagePropertiesTupleFields.Package, value); + } + + public string Vital + { + get => (string)this.Fields[(int)WixPackagePropertiesTupleFields.Vital]?.Value; + set => this.Set((int)WixPackagePropertiesTupleFields.Vital, value); + } + + public string DisplayName + { + get => (string)this.Fields[(int)WixPackagePropertiesTupleFields.DisplayName]?.Value; + set => this.Set((int)WixPackagePropertiesTupleFields.DisplayName, value); + } + + public string Description + { + get => (string)this.Fields[(int)WixPackagePropertiesTupleFields.Description]?.Value; + set => this.Set((int)WixPackagePropertiesTupleFields.Description, value); + } + + public string DownloadSize + { + get => (string)this.Fields[(int)WixPackagePropertiesTupleFields.DownloadSize]?.Value; + set => this.Set((int)WixPackagePropertiesTupleFields.DownloadSize, value); + } + + public string PackageSize + { + get => (string)this.Fields[(int)WixPackagePropertiesTupleFields.PackageSize]?.Value; + set => this.Set((int)WixPackagePropertiesTupleFields.PackageSize, value); + } + + public string InstalledSize + { + get => (string)this.Fields[(int)WixPackagePropertiesTupleFields.InstalledSize]?.Value; + set => this.Set((int)WixPackagePropertiesTupleFields.InstalledSize, value); + } + + public string PackageType + { + get => (string)this.Fields[(int)WixPackagePropertiesTupleFields.PackageType]?.Value; + set => this.Set((int)WixPackagePropertiesTupleFields.PackageType, value); + } + + public string Permanent + { + get => (string)this.Fields[(int)WixPackagePropertiesTupleFields.Permanent]?.Value; + set => this.Set((int)WixPackagePropertiesTupleFields.Permanent, value); + } + + public string LogPathVariable + { + get => (string)this.Fields[(int)WixPackagePropertiesTupleFields.LogPathVariable]?.Value; + set => this.Set((int)WixPackagePropertiesTupleFields.LogPathVariable, value); + } + + public string RollbackLogPathVariable + { + get => (string)this.Fields[(int)WixPackagePropertiesTupleFields.RollbackLogPathVariable]?.Value; + set => this.Set((int)WixPackagePropertiesTupleFields.RollbackLogPathVariable, value); + } + + public string Compressed + { + get => (string)this.Fields[(int)WixPackagePropertiesTupleFields.Compressed]?.Value; + set => this.Set((int)WixPackagePropertiesTupleFields.Compressed, value); + } + + public string DisplayInternalUI + { + get => (string)this.Fields[(int)WixPackagePropertiesTupleFields.DisplayInternalUI]?.Value; + set => this.Set((int)WixPackagePropertiesTupleFields.DisplayInternalUI, value); + } + + public string ProductCode + { + get => (string)this.Fields[(int)WixPackagePropertiesTupleFields.ProductCode]?.Value; + set => this.Set((int)WixPackagePropertiesTupleFields.ProductCode, value); + } + + public string UpgradeCode + { + get => (string)this.Fields[(int)WixPackagePropertiesTupleFields.UpgradeCode]?.Value; + set => this.Set((int)WixPackagePropertiesTupleFields.UpgradeCode, value); + } + + public string Version + { + get => (string)this.Fields[(int)WixPackagePropertiesTupleFields.Version]?.Value; + set => this.Set((int)WixPackagePropertiesTupleFields.Version, value); + } + + public string InstallCondition + { + get => (string)this.Fields[(int)WixPackagePropertiesTupleFields.InstallCondition]?.Value; + set => this.Set((int)WixPackagePropertiesTupleFields.InstallCondition, value); + } + + public string Cache + { + get => (string)this.Fields[(int)WixPackagePropertiesTupleFields.Cache]?.Value; + set => this.Set((int)WixPackagePropertiesTupleFields.Cache, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/WixPatchBaselineTuple.cs b/src/WixToolset.Data/Tuples/WixPatchBaselineTuple.cs new file mode 100644 index 00000000..0610adac --- /dev/null +++ b/src/WixToolset.Data/Tuples/WixPatchBaselineTuple.cs @@ -0,0 +1,60 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition WixPatchBaseline = new IntermediateTupleDefinition( + TupleDefinitionType.WixPatchBaseline, + new[] + { + new IntermediateFieldDefinition(nameof(WixPatchBaselineTupleFields.WixPatchBaseline), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixPatchBaselineTupleFields.DiskId), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(WixPatchBaselineTupleFields.ValidationFlags), IntermediateFieldType.Number), + }, + typeof(WixPatchBaselineTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum WixPatchBaselineTupleFields + { + WixPatchBaseline, + DiskId, + ValidationFlags, + } + + public class WixPatchBaselineTuple : IntermediateTuple + { + public WixPatchBaselineTuple() : base(TupleDefinitions.WixPatchBaseline, null, null) + { + } + + public WixPatchBaselineTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixPatchBaseline, sourceLineNumber, id) + { + } + + public IntermediateField this[WixPatchBaselineTupleFields index] => this.Fields[(int)index]; + + public string WixPatchBaseline + { + get => (string)this.Fields[(int)WixPatchBaselineTupleFields.WixPatchBaseline]?.Value; + set => this.Set((int)WixPatchBaselineTupleFields.WixPatchBaseline, value); + } + + public int DiskId + { + get => (int)this.Fields[(int)WixPatchBaselineTupleFields.DiskId]?.Value; + set => this.Set((int)WixPatchBaselineTupleFields.DiskId, value); + } + + public int ValidationFlags + { + get => (int)this.Fields[(int)WixPatchBaselineTupleFields.ValidationFlags]?.Value; + set => this.Set((int)WixPatchBaselineTupleFields.ValidationFlags, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/WixPatchFamilyGroupTuple.cs b/src/WixToolset.Data/Tuples/WixPatchFamilyGroupTuple.cs new file mode 100644 index 00000000..0683ba9d --- /dev/null +++ b/src/WixToolset.Data/Tuples/WixPatchFamilyGroupTuple.cs @@ -0,0 +1,44 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition WixPatchFamilyGroup = new IntermediateTupleDefinition( + TupleDefinitionType.WixPatchFamilyGroup, + new[] + { + new IntermediateFieldDefinition(nameof(WixPatchFamilyGroupTupleFields.WixPatchFamilyGroup), IntermediateFieldType.String), + }, + typeof(WixPatchFamilyGroupTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum WixPatchFamilyGroupTupleFields + { + WixPatchFamilyGroup, + } + + public class WixPatchFamilyGroupTuple : IntermediateTuple + { + public WixPatchFamilyGroupTuple() : base(TupleDefinitions.WixPatchFamilyGroup, null, null) + { + } + + public WixPatchFamilyGroupTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixPatchFamilyGroup, sourceLineNumber, id) + { + } + + public IntermediateField this[WixPatchFamilyGroupTupleFields index] => this.Fields[(int)index]; + + public string WixPatchFamilyGroup + { + get => (string)this.Fields[(int)WixPatchFamilyGroupTupleFields.WixPatchFamilyGroup]?.Value; + set => this.Set((int)WixPatchFamilyGroupTupleFields.WixPatchFamilyGroup, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/WixPatchIdTuple.cs b/src/WixToolset.Data/Tuples/WixPatchIdTuple.cs new file mode 100644 index 00000000..81b9573d --- /dev/null +++ b/src/WixToolset.Data/Tuples/WixPatchIdTuple.cs @@ -0,0 +1,68 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition WixPatchId = new IntermediateTupleDefinition( + TupleDefinitionType.WixPatchId, + new[] + { + new IntermediateFieldDefinition(nameof(WixPatchIdTupleFields.ProductCode), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixPatchIdTupleFields.ClientPatchId), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixPatchIdTupleFields.OptimizePatchSizeForLargeFiles), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(WixPatchIdTupleFields.ApiPatchingSymbolFlags), IntermediateFieldType.Number), + }, + typeof(WixPatchIdTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum WixPatchIdTupleFields + { + ProductCode, + ClientPatchId, + OptimizePatchSizeForLargeFiles, + ApiPatchingSymbolFlags, + } + + public class WixPatchIdTuple : IntermediateTuple + { + public WixPatchIdTuple() : base(TupleDefinitions.WixPatchId, null, null) + { + } + + public WixPatchIdTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixPatchId, sourceLineNumber, id) + { + } + + public IntermediateField this[WixPatchIdTupleFields index] => this.Fields[(int)index]; + + public string ProductCode + { + get => (string)this.Fields[(int)WixPatchIdTupleFields.ProductCode]?.Value; + set => this.Set((int)WixPatchIdTupleFields.ProductCode, value); + } + + public string ClientPatchId + { + get => (string)this.Fields[(int)WixPatchIdTupleFields.ClientPatchId]?.Value; + set => this.Set((int)WixPatchIdTupleFields.ClientPatchId, value); + } + + public int OptimizePatchSizeForLargeFiles + { + get => (int)this.Fields[(int)WixPatchIdTupleFields.OptimizePatchSizeForLargeFiles]?.Value; + set => this.Set((int)WixPatchIdTupleFields.OptimizePatchSizeForLargeFiles, value); + } + + public int ApiPatchingSymbolFlags + { + get => (int)this.Fields[(int)WixPatchIdTupleFields.ApiPatchingSymbolFlags]?.Value; + set => this.Set((int)WixPatchIdTupleFields.ApiPatchingSymbolFlags, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/WixPatchMetadataTuple.cs b/src/WixToolset.Data/Tuples/WixPatchMetadataTuple.cs new file mode 100644 index 00000000..c00031a5 --- /dev/null +++ b/src/WixToolset.Data/Tuples/WixPatchMetadataTuple.cs @@ -0,0 +1,52 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition WixPatchMetadata = new IntermediateTupleDefinition( + TupleDefinitionType.WixPatchMetadata, + new[] + { + new IntermediateFieldDefinition(nameof(WixPatchMetadataTupleFields.Property), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixPatchMetadataTupleFields.Value), IntermediateFieldType.String), + }, + typeof(WixPatchMetadataTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum WixPatchMetadataTupleFields + { + Property, + Value, + } + + public class WixPatchMetadataTuple : IntermediateTuple + { + public WixPatchMetadataTuple() : base(TupleDefinitions.WixPatchMetadata, null, null) + { + } + + public WixPatchMetadataTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixPatchMetadata, sourceLineNumber, id) + { + } + + public IntermediateField this[WixPatchMetadataTupleFields index] => this.Fields[(int)index]; + + public string Property + { + get => (string)this.Fields[(int)WixPatchMetadataTupleFields.Property]?.Value; + set => this.Set((int)WixPatchMetadataTupleFields.Property, value); + } + + public string Value + { + get => (string)this.Fields[(int)WixPatchMetadataTupleFields.Value]?.Value; + set => this.Set((int)WixPatchMetadataTupleFields.Value, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/WixPatchRefTuple.cs b/src/WixToolset.Data/Tuples/WixPatchRefTuple.cs new file mode 100644 index 00000000..63528439 --- /dev/null +++ b/src/WixToolset.Data/Tuples/WixPatchRefTuple.cs @@ -0,0 +1,52 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition WixPatchRef = new IntermediateTupleDefinition( + TupleDefinitionType.WixPatchRef, + new[] + { + new IntermediateFieldDefinition(nameof(WixPatchRefTupleFields.Table), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixPatchRefTupleFields.PrimaryKeys), IntermediateFieldType.String), + }, + typeof(WixPatchRefTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum WixPatchRefTupleFields + { + Table, + PrimaryKeys, + } + + public class WixPatchRefTuple : IntermediateTuple + { + public WixPatchRefTuple() : base(TupleDefinitions.WixPatchRef, null, null) + { + } + + public WixPatchRefTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixPatchRef, sourceLineNumber, id) + { + } + + public IntermediateField this[WixPatchRefTupleFields index] => this.Fields[(int)index]; + + public string Table + { + get => (string)this.Fields[(int)WixPatchRefTupleFields.Table]?.Value; + set => this.Set((int)WixPatchRefTupleFields.Table, value); + } + + public string PrimaryKeys + { + get => (string)this.Fields[(int)WixPatchRefTupleFields.PrimaryKeys]?.Value; + set => this.Set((int)WixPatchRefTupleFields.PrimaryKeys, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/WixPatchTargetTuple.cs b/src/WixToolset.Data/Tuples/WixPatchTargetTuple.cs new file mode 100644 index 00000000..8940c0c6 --- /dev/null +++ b/src/WixToolset.Data/Tuples/WixPatchTargetTuple.cs @@ -0,0 +1,44 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition WixPatchTarget = new IntermediateTupleDefinition( + TupleDefinitionType.WixPatchTarget, + new[] + { + new IntermediateFieldDefinition(nameof(WixPatchTargetTupleFields.ProductCode), IntermediateFieldType.String), + }, + typeof(WixPatchTargetTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum WixPatchTargetTupleFields + { + ProductCode, + } + + public class WixPatchTargetTuple : IntermediateTuple + { + public WixPatchTargetTuple() : base(TupleDefinitions.WixPatchTarget, null, null) + { + } + + public WixPatchTargetTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixPatchTarget, sourceLineNumber, id) + { + } + + public IntermediateField this[WixPatchTargetTupleFields index] => this.Fields[(int)index]; + + public string ProductCode + { + get => (string)this.Fields[(int)WixPatchTargetTupleFields.ProductCode]?.Value; + set => this.Set((int)WixPatchTargetTupleFields.ProductCode, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/WixPayloadPropertiesTuple.cs b/src/WixToolset.Data/Tuples/WixPayloadPropertiesTuple.cs new file mode 100644 index 00000000..3c437a58 --- /dev/null +++ b/src/WixToolset.Data/Tuples/WixPayloadPropertiesTuple.cs @@ -0,0 +1,92 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition WixPayloadProperties = new IntermediateTupleDefinition( + TupleDefinitionType.WixPayloadProperties, + new[] + { + new IntermediateFieldDefinition(nameof(WixPayloadPropertiesTupleFields.Payload), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixPayloadPropertiesTupleFields.Package), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixPayloadPropertiesTupleFields.Container), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixPayloadPropertiesTupleFields.Name), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixPayloadPropertiesTupleFields.Size), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixPayloadPropertiesTupleFields.DownloadUrl), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixPayloadPropertiesTupleFields.LayoutOnly), IntermediateFieldType.String), + }, + typeof(WixPayloadPropertiesTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum WixPayloadPropertiesTupleFields + { + Payload, + Package, + Container, + Name, + Size, + DownloadUrl, + LayoutOnly, + } + + public class WixPayloadPropertiesTuple : IntermediateTuple + { + public WixPayloadPropertiesTuple() : base(TupleDefinitions.WixPayloadProperties, null, null) + { + } + + public WixPayloadPropertiesTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixPayloadProperties, sourceLineNumber, id) + { + } + + public IntermediateField this[WixPayloadPropertiesTupleFields index] => this.Fields[(int)index]; + + public string Payload + { + get => (string)this.Fields[(int)WixPayloadPropertiesTupleFields.Payload]?.Value; + set => this.Set((int)WixPayloadPropertiesTupleFields.Payload, value); + } + + public string Package + { + get => (string)this.Fields[(int)WixPayloadPropertiesTupleFields.Package]?.Value; + set => this.Set((int)WixPayloadPropertiesTupleFields.Package, value); + } + + public string Container + { + get => (string)this.Fields[(int)WixPayloadPropertiesTupleFields.Container]?.Value; + set => this.Set((int)WixPayloadPropertiesTupleFields.Container, value); + } + + public string Name + { + get => (string)this.Fields[(int)WixPayloadPropertiesTupleFields.Name]?.Value; + set => this.Set((int)WixPayloadPropertiesTupleFields.Name, value); + } + + public string Size + { + get => (string)this.Fields[(int)WixPayloadPropertiesTupleFields.Size]?.Value; + set => this.Set((int)WixPayloadPropertiesTupleFields.Size, value); + } + + public string DownloadUrl + { + get => (string)this.Fields[(int)WixPayloadPropertiesTupleFields.DownloadUrl]?.Value; + set => this.Set((int)WixPayloadPropertiesTupleFields.DownloadUrl, value); + } + + public string LayoutOnly + { + get => (string)this.Fields[(int)WixPayloadPropertiesTupleFields.LayoutOnly]?.Value; + set => this.Set((int)WixPayloadPropertiesTupleFields.LayoutOnly, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/WixProductSearchTuple.cs b/src/WixToolset.Data/Tuples/WixProductSearchTuple.cs new file mode 100644 index 00000000..40065f55 --- /dev/null +++ b/src/WixToolset.Data/Tuples/WixProductSearchTuple.cs @@ -0,0 +1,60 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition WixProductSearch = new IntermediateTupleDefinition( + TupleDefinitionType.WixProductSearch, + new[] + { + new IntermediateFieldDefinition(nameof(WixProductSearchTupleFields.WixSearch_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixProductSearchTupleFields.Guid), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixProductSearchTupleFields.Attributes), IntermediateFieldType.Number), + }, + typeof(WixProductSearchTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum WixProductSearchTupleFields + { + WixSearch_, + Guid, + Attributes, + } + + public class WixProductSearchTuple : IntermediateTuple + { + public WixProductSearchTuple() : base(TupleDefinitions.WixProductSearch, null, null) + { + } + + public WixProductSearchTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixProductSearch, sourceLineNumber, id) + { + } + + public IntermediateField this[WixProductSearchTupleFields index] => this.Fields[(int)index]; + + public string WixSearch_ + { + get => (string)this.Fields[(int)WixProductSearchTupleFields.WixSearch_]?.Value; + set => this.Set((int)WixProductSearchTupleFields.WixSearch_, value); + } + + public string Guid + { + get => (string)this.Fields[(int)WixProductSearchTupleFields.Guid]?.Value; + set => this.Set((int)WixProductSearchTupleFields.Guid, value); + } + + public int Attributes + { + get => (int)this.Fields[(int)WixProductSearchTupleFields.Attributes]?.Value; + set => this.Set((int)WixProductSearchTupleFields.Attributes, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/WixPropertyTuple.cs b/src/WixToolset.Data/Tuples/WixPropertyTuple.cs new file mode 100644 index 00000000..74e17d18 --- /dev/null +++ b/src/WixToolset.Data/Tuples/WixPropertyTuple.cs @@ -0,0 +1,68 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition WixProperty = new IntermediateTupleDefinition( + TupleDefinitionType.WixProperty, + new[] + { + new IntermediateFieldDefinition(nameof(WixPropertyTupleFields.Property_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixPropertyTupleFields.Admin), IntermediateFieldType.Bool), + new IntermediateFieldDefinition(nameof(WixPropertyTupleFields.Hidden), IntermediateFieldType.Bool), + new IntermediateFieldDefinition(nameof(WixPropertyTupleFields.Secure), IntermediateFieldType.Bool), + }, + typeof(WixPropertyTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum WixPropertyTupleFields + { + Property_, + Admin, + Hidden, + Secure, + } + + public class WixPropertyTuple : IntermediateTuple + { + public WixPropertyTuple() : base(TupleDefinitions.WixProperty, null, null) + { + } + + public WixPropertyTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixProperty, sourceLineNumber, id) + { + } + + public IntermediateField this[WixPropertyTupleFields index] => this.Fields[(int)index]; + + public string Property_ + { + get => (string)this.Fields[(int)WixPropertyTupleFields.Property_]?.Value; + set => this.Set((int)WixPropertyTupleFields.Property_, value); + } + + public bool Admin + { + get => (bool)this.Fields[(int)WixPropertyTupleFields.Admin]?.Value; + set => this.Set((int)WixPropertyTupleFields.Admin, value); + } + + public bool Hidden + { + get => (bool)this.Fields[(int)WixPropertyTupleFields.Hidden]?.Value; + set => this.Set((int)WixPropertyTupleFields.Hidden, value); + } + + public bool Secure + { + get => (bool)this.Fields[(int)WixPropertyTupleFields.Secure]?.Value; + set => this.Set((int)WixPropertyTupleFields.Secure, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/WixRegistrySearchTuple.cs b/src/WixToolset.Data/Tuples/WixRegistrySearchTuple.cs new file mode 100644 index 00000000..c23bf957 --- /dev/null +++ b/src/WixToolset.Data/Tuples/WixRegistrySearchTuple.cs @@ -0,0 +1,76 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition WixRegistrySearch = new IntermediateTupleDefinition( + TupleDefinitionType.WixRegistrySearch, + new[] + { + new IntermediateFieldDefinition(nameof(WixRegistrySearchTupleFields.WixSearch_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixRegistrySearchTupleFields.Root), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(WixRegistrySearchTupleFields.Key), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixRegistrySearchTupleFields.Value), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixRegistrySearchTupleFields.Attributes), IntermediateFieldType.Number), + }, + typeof(WixRegistrySearchTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum WixRegistrySearchTupleFields + { + WixSearch_, + Root, + Key, + Value, + Attributes, + } + + public class WixRegistrySearchTuple : IntermediateTuple + { + public WixRegistrySearchTuple() : base(TupleDefinitions.WixRegistrySearch, null, null) + { + } + + public WixRegistrySearchTuple(SourceLineNumber sourceLineNumber , Identifier id = null) : base(TupleDefinitions.WixRegistrySearch, sourceLineNumber, id) + { + } + + public IntermediateField this[WixRegistrySearchTupleFields index] => this.Fields[(int)index]; + + public string WixSearch_ + { + get => (string)this.Fields[(int)WixRegistrySearchTupleFields.WixSearch_]?.Value; + set => this.Set((int)WixRegistrySearchTupleFields.WixSearch_, value); + } + + public int Root + { + get => (int)this.Fields[(int)WixRegistrySearchTupleFields.Root]?.Value; + set => this.Set((int)WixRegistrySearchTupleFields.Root, value); + } + + public string Key + { + get => (string)this.Fields[(int)WixRegistrySearchTupleFields.Key]?.Value; + set => this.Set((int)WixRegistrySearchTupleFields.Key, value); + } + + public string Value + { + get => (string)this.Fields[(int)WixRegistrySearchTupleFields.Value]?.Value; + set => this.Set((int)WixRegistrySearchTupleFields.Value, value); + } + + public int Attributes + { + get => (int)this.Fields[(int)WixRegistrySearchTupleFields.Attributes]?.Value; + set => this.Set((int)WixRegistrySearchTupleFields.Attributes, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/WixRelatedBundleTuple.cs b/src/WixToolset.Data/Tuples/WixRelatedBundleTuple.cs new file mode 100644 index 00000000..491e9aa1 --- /dev/null +++ b/src/WixToolset.Data/Tuples/WixRelatedBundleTuple.cs @@ -0,0 +1,52 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition WixRelatedBundle = new IntermediateTupleDefinition( + TupleDefinitionType.WixRelatedBundle, + new[] + { + new IntermediateFieldDefinition(nameof(WixRelatedBundleTupleFields.Id), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixRelatedBundleTupleFields.Action), IntermediateFieldType.Number), + }, + typeof(WixRelatedBundleTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum WixRelatedBundleTupleFields + { + Id, + Action, + } + + public class WixRelatedBundleTuple : IntermediateTuple + { + public WixRelatedBundleTuple() : base(TupleDefinitions.WixRelatedBundle, null, null) + { + } + + public WixRelatedBundleTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixRelatedBundle, sourceLineNumber, id) + { + } + + public IntermediateField this[WixRelatedBundleTupleFields index] => this.Fields[(int)index]; + + public string Id + { + get => (string)this.Fields[(int)WixRelatedBundleTupleFields.Id]?.Value; + set => this.Set((int)WixRelatedBundleTupleFields.Id, value); + } + + public int Action + { + get => (int)this.Fields[(int)WixRelatedBundleTupleFields.Action]?.Value; + set => this.Set((int)WixRelatedBundleTupleFields.Action, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/WixSearchRelationTuple.cs b/src/WixToolset.Data/Tuples/WixSearchRelationTuple.cs new file mode 100644 index 00000000..05021a11 --- /dev/null +++ b/src/WixToolset.Data/Tuples/WixSearchRelationTuple.cs @@ -0,0 +1,60 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition WixSearchRelation = new IntermediateTupleDefinition( + TupleDefinitionType.WixSearchRelation, + new[] + { + new IntermediateFieldDefinition(nameof(WixSearchRelationTupleFields.WixSearch_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixSearchRelationTupleFields.ParentId_), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixSearchRelationTupleFields.Attributes), IntermediateFieldType.Number), + }, + typeof(WixSearchRelationTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum WixSearchRelationTupleFields + { + WixSearch_, + ParentId_, + Attributes, + } + + public class WixSearchRelationTuple : IntermediateTuple + { + public WixSearchRelationTuple() : base(TupleDefinitions.WixSearchRelation, null, null) + { + } + + public WixSearchRelationTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixSearchRelation, sourceLineNumber, id) + { + } + + public IntermediateField this[WixSearchRelationTupleFields index] => this.Fields[(int)index]; + + public string WixSearch_ + { + get => (string)this.Fields[(int)WixSearchRelationTupleFields.WixSearch_]?.Value; + set => this.Set((int)WixSearchRelationTupleFields.WixSearch_, value); + } + + public string ParentId_ + { + get => (string)this.Fields[(int)WixSearchRelationTupleFields.ParentId_]?.Value; + set => this.Set((int)WixSearchRelationTupleFields.ParentId_, value); + } + + public int Attributes + { + get => (int)this.Fields[(int)WixSearchRelationTupleFields.Attributes]?.Value; + set => this.Set((int)WixSearchRelationTupleFields.Attributes, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/WixSearchTuple.cs b/src/WixToolset.Data/Tuples/WixSearchTuple.cs new file mode 100644 index 00000000..887a7b0d --- /dev/null +++ b/src/WixToolset.Data/Tuples/WixSearchTuple.cs @@ -0,0 +1,60 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition WixSearch = new IntermediateTupleDefinition( + TupleDefinitionType.WixSearch, + new[] + { + new IntermediateFieldDefinition(nameof(WixSearchTupleFields.WixSearch), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixSearchTupleFields.Variable), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixSearchTupleFields.Condition), IntermediateFieldType.String), + }, + typeof(WixSearchTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum WixSearchTupleFields + { + WixSearch, + Variable, + Condition, + } + + public class WixSearchTuple : IntermediateTuple + { + public WixSearchTuple() : base(TupleDefinitions.WixSearch, null, null) + { + } + + public WixSearchTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixSearch, sourceLineNumber, id) + { + } + + public IntermediateField this[WixSearchTupleFields index] => this.Fields[(int)index]; + + public string WixSearch + { + get => (string)this.Fields[(int)WixSearchTupleFields.WixSearch]?.Value; + set => this.Set((int)WixSearchTupleFields.WixSearch, value); + } + + public string Variable + { + get => (string)this.Fields[(int)WixSearchTupleFields.Variable]?.Value; + set => this.Set((int)WixSearchTupleFields.Variable, value); + } + + public string Condition + { + get => (string)this.Fields[(int)WixSearchTupleFields.Condition]?.Value; + set => this.Set((int)WixSearchTupleFields.Condition, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/WixSimpleReferenceTuple.cs b/src/WixToolset.Data/Tuples/WixSimpleReferenceTuple.cs new file mode 100644 index 00000000..5641f2b3 --- /dev/null +++ b/src/WixToolset.Data/Tuples/WixSimpleReferenceTuple.cs @@ -0,0 +1,60 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition WixSimpleReference = new IntermediateTupleDefinition( + TupleDefinitionType.WixSimpleReference, + new[] + { + new IntermediateFieldDefinition(nameof(WixSimpleReferenceTupleFields.Table), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixSimpleReferenceTupleFields.PrimaryKeys), IntermediateFieldType.String), + }, + typeof(WixSimpleReferenceTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + using System; + + public enum WixSimpleReferenceTupleFields + { + Table, + PrimaryKeys, + } + + public class WixSimpleReferenceTuple : IntermediateTuple + { + public WixSimpleReferenceTuple() : base(TupleDefinitions.WixSimpleReference, null, null) + { + } + + public WixSimpleReferenceTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixSimpleReference, sourceLineNumber, id) + { + } + + public IntermediateField this[WixSimpleReferenceTupleFields index] => this.Fields[(int)index]; + + public string Table + { + get => (string)this.Fields[(int)WixSimpleReferenceTupleFields.Table]?.Value; + set => this.Set((int)WixSimpleReferenceTupleFields.Table, value); + } + + public string PrimaryKeys + { + get => (string)this.Fields[(int)WixSimpleReferenceTupleFields.PrimaryKeys]?.Value; + set => this.Set((int)WixSimpleReferenceTupleFields.PrimaryKeys, value); + } + + /// + /// Gets the symbolic name. + /// + /// Symbolic name. + public string SymbolicName => String.Concat(this.Table, ":", this.PrimaryKeys); + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/WixSuppressActionTuple.cs b/src/WixToolset.Data/Tuples/WixSuppressActionTuple.cs new file mode 100644 index 00000000..ad8b443e --- /dev/null +++ b/src/WixToolset.Data/Tuples/WixSuppressActionTuple.cs @@ -0,0 +1,52 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition WixSuppressAction = new IntermediateTupleDefinition( + TupleDefinitionType.WixSuppressAction, + new[] + { + new IntermediateFieldDefinition(nameof(WixSuppressActionTupleFields.SequenceTable), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixSuppressActionTupleFields.Action), IntermediateFieldType.String), + }, + typeof(WixSuppressActionTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum WixSuppressActionTupleFields + { + SequenceTable, + Action, + } + + public class WixSuppressActionTuple : IntermediateTuple + { + public WixSuppressActionTuple() : base(TupleDefinitions.WixSuppressAction, null, null) + { + } + + public WixSuppressActionTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixSuppressAction, sourceLineNumber, id) + { + } + + public IntermediateField this[WixSuppressActionTupleFields index] => this.Fields[(int)index]; + + public string SequenceTable + { + get => (string)this.Fields[(int)WixSuppressActionTupleFields.SequenceTable]?.Value; + set => this.Set((int)WixSuppressActionTupleFields.SequenceTable, value); + } + + public string Action + { + get => (string)this.Fields[(int)WixSuppressActionTupleFields.Action]?.Value; + set => this.Set((int)WixSuppressActionTupleFields.Action, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/WixSuppressModularizationTuple.cs b/src/WixToolset.Data/Tuples/WixSuppressModularizationTuple.cs new file mode 100644 index 00000000..c6f42eac --- /dev/null +++ b/src/WixToolset.Data/Tuples/WixSuppressModularizationTuple.cs @@ -0,0 +1,44 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition WixSuppressModularization = new IntermediateTupleDefinition( + TupleDefinitionType.WixSuppressModularization, + new[] + { + new IntermediateFieldDefinition(nameof(WixSuppressModularizationTupleFields.WixSuppressModularization), IntermediateFieldType.String), + }, + typeof(WixSuppressModularizationTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum WixSuppressModularizationTupleFields + { + WixSuppressModularization, + } + + public class WixSuppressModularizationTuple : IntermediateTuple + { + public WixSuppressModularizationTuple() : base(TupleDefinitions.WixSuppressModularization, null, null) + { + } + + public WixSuppressModularizationTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixSuppressModularization, sourceLineNumber, id) + { + } + + public IntermediateField this[WixSuppressModularizationTupleFields index] => this.Fields[(int)index]; + + public string WixSuppressModularization + { + get => (string)this.Fields[(int)WixSuppressModularizationTupleFields.WixSuppressModularization]?.Value; + set => this.Set((int)WixSuppressModularizationTupleFields.WixSuppressModularization, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/WixUITuple.cs b/src/WixToolset.Data/Tuples/WixUITuple.cs new file mode 100644 index 00000000..99e19300 --- /dev/null +++ b/src/WixToolset.Data/Tuples/WixUITuple.cs @@ -0,0 +1,44 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition WixUI = new IntermediateTupleDefinition( + TupleDefinitionType.WixUI, + new[] + { + new IntermediateFieldDefinition(nameof(WixUITupleFields.WixUI), IntermediateFieldType.String), + }, + typeof(WixUITuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum WixUITupleFields + { + WixUI, + } + + public class WixUITuple : IntermediateTuple + { + public WixUITuple() : base(TupleDefinitions.WixUI, null, null) + { + } + + public WixUITuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixUI, sourceLineNumber, id) + { + } + + public IntermediateField this[WixUITupleFields index] => this.Fields[(int)index]; + + public string WixUI + { + get => (string)this.Fields[(int)WixUITupleFields.WixUI]?.Value; + set => this.Set((int)WixUITupleFields.WixUI, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/WixUpdateRegistrationTuple.cs b/src/WixToolset.Data/Tuples/WixUpdateRegistrationTuple.cs new file mode 100644 index 00000000..64043ffe --- /dev/null +++ b/src/WixToolset.Data/Tuples/WixUpdateRegistrationTuple.cs @@ -0,0 +1,76 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition WixUpdateRegistration = new IntermediateTupleDefinition( + TupleDefinitionType.WixUpdateRegistration, + new[] + { + new IntermediateFieldDefinition(nameof(WixUpdateRegistrationTupleFields.Manufacturer), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixUpdateRegistrationTupleFields.Department), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixUpdateRegistrationTupleFields.ProductFamily), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixUpdateRegistrationTupleFields.Name), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixUpdateRegistrationTupleFields.Classification), IntermediateFieldType.String), + }, + typeof(WixUpdateRegistrationTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum WixUpdateRegistrationTupleFields + { + Manufacturer, + Department, + ProductFamily, + Name, + Classification, + } + + public class WixUpdateRegistrationTuple : IntermediateTuple + { + public WixUpdateRegistrationTuple() : base(TupleDefinitions.WixUpdateRegistration, null, null) + { + } + + public WixUpdateRegistrationTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixUpdateRegistration, sourceLineNumber, id) + { + } + + public IntermediateField this[WixUpdateRegistrationTupleFields index] => this.Fields[(int)index]; + + public string Manufacturer + { + get => (string)this.Fields[(int)WixUpdateRegistrationTupleFields.Manufacturer]?.Value; + set => this.Set((int)WixUpdateRegistrationTupleFields.Manufacturer, value); + } + + public string Department + { + get => (string)this.Fields[(int)WixUpdateRegistrationTupleFields.Department]?.Value; + set => this.Set((int)WixUpdateRegistrationTupleFields.Department, value); + } + + public string ProductFamily + { + get => (string)this.Fields[(int)WixUpdateRegistrationTupleFields.ProductFamily]?.Value; + set => this.Set((int)WixUpdateRegistrationTupleFields.ProductFamily, value); + } + + public string Name + { + get => (string)this.Fields[(int)WixUpdateRegistrationTupleFields.Name]?.Value; + set => this.Set((int)WixUpdateRegistrationTupleFields.Name, value); + } + + public string Classification + { + get => (string)this.Fields[(int)WixUpdateRegistrationTupleFields.Classification]?.Value; + set => this.Set((int)WixUpdateRegistrationTupleFields.Classification, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/WixVariableTuple.cs b/src/WixToolset.Data/Tuples/WixVariableTuple.cs new file mode 100644 index 00000000..6b6e7354 --- /dev/null +++ b/src/WixToolset.Data/Tuples/WixVariableTuple.cs @@ -0,0 +1,60 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition WixVariable = new IntermediateTupleDefinition( + TupleDefinitionType.WixVariable, + new[] + { + new IntermediateFieldDefinition(nameof(WixVariableTupleFields.WixVariable), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixVariableTupleFields.Value), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixVariableTupleFields.Overridable), IntermediateFieldType.Bool), + }, + typeof(WixVariableTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum WixVariableTupleFields + { + WixVariable, + Value, + Overridable, + } + + public class WixVariableTuple : IntermediateTuple + { + public WixVariableTuple() : base(TupleDefinitions.WixVariable, null, null) + { + } + + public WixVariableTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixVariable, sourceLineNumber, id) + { + } + + public IntermediateField this[WixVariableTupleFields index] => this.Fields[(int)index]; + + public string WixVariable + { + get => (string)this.Fields[(int)WixVariableTupleFields.WixVariable]?.Value; + set => this.Set((int)WixVariableTupleFields.WixVariable, value); + } + + public string Value + { + get => (string)this.Fields[(int)WixVariableTupleFields.Value]?.Value; + set => this.Set((int)WixVariableTupleFields.Value, value); + } + + public bool Overridable + { + get => (bool)this.Fields[(int)WixVariableTupleFields.Overridable]?.Value; + set => this.Set((int)WixVariableTupleFields.Overridable, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/_ByHandComponentTuple.cs b/src/WixToolset.Data/Tuples/_ByHandComponentTuple.cs new file mode 100644 index 00000000..0e8fe8e7 --- /dev/null +++ b/src/WixToolset.Data/Tuples/_ByHandComponentTuple.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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition ComponentOriginal = new IntermediateTupleDefinition(TupleDefinitionType.Component, new[] + { + new IntermediateFieldDefinition("Guid", IntermediateFieldType.String), + new IntermediateFieldDefinition("Directory", IntermediateFieldType.String), + new IntermediateFieldDefinition("Condition", IntermediateFieldType.String), + new IntermediateFieldDefinition("KeyPath", IntermediateFieldType.String), + new IntermediateFieldDefinition("LocalOnly", IntermediateFieldType.Bool), + new IntermediateFieldDefinition("SourceOnly", IntermediateFieldType.Bool), + new IntermediateFieldDefinition("Optional", IntermediateFieldType.Bool), + new IntermediateFieldDefinition("RegistryKeyPath", IntermediateFieldType.Bool), + new IntermediateFieldDefinition("SharedDllRefCount", IntermediateFieldType.Bool), + new IntermediateFieldDefinition("Permanent", IntermediateFieldType.Bool), + new IntermediateFieldDefinition("OdbcDataSource", IntermediateFieldType.Bool), + new IntermediateFieldDefinition("Transitive", IntermediateFieldType.Bool), + new IntermediateFieldDefinition("NeverOverwrite", IntermediateFieldType.Bool), + new IntermediateFieldDefinition("x64", IntermediateFieldType.Bool), + new IntermediateFieldDefinition("DisableRegistryReflection", IntermediateFieldType.Bool), + new IntermediateFieldDefinition("UnisntallOnSupersedence", IntermediateFieldType.Bool), + new IntermediateFieldDefinition("Shared", IntermediateFieldType.Bool), + }, typeof(ComponentTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + using System; + + public class ComponentTupleOriginal : IntermediateTuple + { + public ComponentTupleOriginal(IntermediateTupleDefinition definition) : base(definition, null, null) + { + if (definition != TupleDefinitions.ComponentOriginal) throw new ArgumentException(nameof(definition)); + } + + public string Guid + { + get => (string)this[0]?.Value; + set => this.Set(0, value); + } + + public string Directory + { + get => (string)this[1]?.Value; + set => this.Set(1, value); + } + } +} diff --git a/src/WixToolset.Data/Tuples/_ByHandFileTuple.cs b/src/WixToolset.Data/Tuples/_ByHandFileTuple.cs new file mode 100644 index 00000000..79fb31e5 --- /dev/null +++ b/src/WixToolset.Data/Tuples/_ByHandFileTuple.cs @@ -0,0 +1,88 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + //public static partial class TupleDefinitionNames + //{ + // public const string File = nameof(TupleDefinitionNames.File); + //} + + /* + [ + { + "File" : [ + { "Component" : "string" }, + { "Name" : "string" }, + { "Compressed" : "bool" }, + ] + }, + { + "Component": [ + { "Guid" : "string" }, + ] + }, + ] + */ + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition FileOriginal = new IntermediateTupleDefinition( + TupleDefinitionType.File, + new[] + { + new IntermediateFieldDefinition(nameof(FileTupleFieldsOriginal.Component), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(FileTupleFieldsOriginal.Name), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(FileTupleFieldsOriginal.ShortName), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(FileTupleFieldsOriginal.Size), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(FileTupleFieldsOriginal.Version), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(FileTupleFieldsOriginal.Language), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(FileTupleFieldsOriginal.ReadOnly), IntermediateFieldType.Bool), + new IntermediateFieldDefinition(nameof(FileTupleFieldsOriginal.Hidden), IntermediateFieldType.Bool), + new IntermediateFieldDefinition(nameof(FileTupleFieldsOriginal.System), IntermediateFieldType.Bool), + new IntermediateFieldDefinition(nameof(FileTupleFieldsOriginal.Vital), IntermediateFieldType.Bool), + new IntermediateFieldDefinition(nameof(FileTupleFieldsOriginal.Checksum), IntermediateFieldType.Bool), + new IntermediateFieldDefinition(nameof(FileTupleFieldsOriginal.Compressed), IntermediateFieldType.Bool), + }, + typeof(FileTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum FileTupleFieldsOriginal + { + Component, + Name, + ShortName, + Size, + Version, + Language, + ReadOnly, + Hidden, + System, + Vital, + Checksum, + Compressed, + } + + public class FileTupleOriginal : IntermediateTuple + { + public FileTupleOriginal() : base(TupleDefinitions.File, null, null) + { + } + + public FileTupleOriginal(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.File, sourceLineNumber, id) + { + } + + public IntermediateField this[FileTupleFields index] => this.Fields[(int)index]; + + public string Component + { + get => (string)this.Fields[(int)FileTupleFieldsOriginal.Component]?.Value; + set => this.Set((int)FileTupleFieldsOriginal.Component, value); + } + } +} diff --git a/src/WixToolset.Data/Tuples/_ByHandTupleDefinitions.cs b/src/WixToolset.Data/Tuples/_ByHandTupleDefinitions.cs new file mode 100644 index 00000000..0cb0feeb --- /dev/null +++ b/src/WixToolset.Data/Tuples/_ByHandTupleDefinitions.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. + +#if false +namespace WixToolset.Data.Tuples +{ + using System; + + //public enum TupleDefinitionType + //{ + // Component, + // File, + // MustBeFromAnExtension, + //} + + public static partial class TupleDefinitionsOriginal + { + public static readonly Version Version = new Version("4.0.0"); + + public static IntermediateTupleDefinition ByName(string name) + { + if (!Enum.TryParse(name, out TupleDefinitionType type) || type == TupleDefinitionType.MustBeFromAnExtension) + { + return null; + } + + return ByType(type); + } + + public static IntermediateTupleDefinition ByType(TupleDefinitionType type) + { + switch (type) + { + //case TupleDefinitionType.Component: + // return TupleDefinitions.Component; + + //case TupleDefinitionType.File: + // return TupleDefinitions.File; + + default: + throw new ArgumentOutOfRangeException(nameof(type)); + } + } + + //public static T CreateTuple() where T : IntermediateTuple + //{ + // if (TypeToName.TryGetValue(typeof(T), out var name)) + // { + // return ByName(name)?.CreateTuple(); + // } + + // return null; + //} + } +} +#endif diff --git a/src/WixToolset.Data/Tuples/_StreamsTuple.cs b/src/WixToolset.Data/Tuples/_StreamsTuple.cs new file mode 100644 index 00000000..1f9d75e8 --- /dev/null +++ b/src/WixToolset.Data/Tuples/_StreamsTuple.cs @@ -0,0 +1,52 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition _Streams = new IntermediateTupleDefinition( + TupleDefinitionType._Streams, + new[] + { + new IntermediateFieldDefinition(nameof(_StreamsTupleFields.Name), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(_StreamsTupleFields.Data), IntermediateFieldType.Path), + }, + typeof(_StreamsTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum _StreamsTupleFields + { + Name, + Data, + } + + public class _StreamsTuple : IntermediateTuple + { + public _StreamsTuple() : base(TupleDefinitions._Streams, null, null) + { + } + + public _StreamsTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions._Streams, sourceLineNumber, id) + { + } + + public IntermediateField this[_StreamsTupleFields index] => this.Fields[(int)index]; + + public string Name + { + get => (string)this.Fields[(int)_StreamsTupleFields.Name]?.Value; + set => this.Set((int)_StreamsTupleFields.Name, value); + } + + public string Data + { + get => (string)this.Fields[(int)_StreamsTupleFields.Data]?.Value; + set => this.Set((int)_StreamsTupleFields.Data, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/_SummaryInformationTuple.cs b/src/WixToolset.Data/Tuples/_SummaryInformationTuple.cs new file mode 100644 index 00000000..4ce3b63f --- /dev/null +++ b/src/WixToolset.Data/Tuples/_SummaryInformationTuple.cs @@ -0,0 +1,52 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition _SummaryInformation = new IntermediateTupleDefinition( + TupleDefinitionType._SummaryInformation, + new[] + { + new IntermediateFieldDefinition(nameof(_SummaryInformationTupleFields.PropertyId), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(_SummaryInformationTupleFields.Value), IntermediateFieldType.String), + }, + typeof(_SummaryInformationTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum _SummaryInformationTupleFields + { + PropertyId, + Value, + } + + public class _SummaryInformationTuple : IntermediateTuple + { + public _SummaryInformationTuple() : base(TupleDefinitions._SummaryInformation, null, null) + { + } + + public _SummaryInformationTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions._SummaryInformation, sourceLineNumber, id) + { + } + + public IntermediateField this[_SummaryInformationTupleFields index] => this.Fields[(int)index]; + + public int PropertyId + { + get => (int)this.Fields[(int)_SummaryInformationTupleFields.PropertyId]?.Value; + set => this.Set((int)_SummaryInformationTupleFields.PropertyId, value); + } + + public string Value + { + get => (string)this.Fields[(int)_SummaryInformationTupleFields.Value]?.Value; + set => this.Set((int)_SummaryInformationTupleFields.Value, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/_TransformViewTuple.cs b/src/WixToolset.Data/Tuples/_TransformViewTuple.cs new file mode 100644 index 00000000..e3355062 --- /dev/null +++ b/src/WixToolset.Data/Tuples/_TransformViewTuple.cs @@ -0,0 +1,76 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition _TransformView = new IntermediateTupleDefinition( + TupleDefinitionType._TransformView, + new[] + { + new IntermediateFieldDefinition(nameof(_TransformViewTupleFields.Table), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(_TransformViewTupleFields.Column), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(_TransformViewTupleFields.Row), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(_TransformViewTupleFields.Data), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(_TransformViewTupleFields.Current), IntermediateFieldType.String), + }, + typeof(_TransformViewTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum _TransformViewTupleFields + { + Table, + Column, + Row, + Data, + Current, + } + + public class _TransformViewTuple : IntermediateTuple + { + public _TransformViewTuple() : base(TupleDefinitions._TransformView, null, null) + { + } + + public _TransformViewTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions._TransformView, sourceLineNumber, id) + { + } + + public IntermediateField this[_TransformViewTupleFields index] => this.Fields[(int)index]; + + public string Table + { + get => (string)this.Fields[(int)_TransformViewTupleFields.Table]?.Value; + set => this.Set((int)_TransformViewTupleFields.Table, value); + } + + public string Column + { + get => (string)this.Fields[(int)_TransformViewTupleFields.Column]?.Value; + set => this.Set((int)_TransformViewTupleFields.Column, value); + } + + public string Row + { + get => (string)this.Fields[(int)_TransformViewTupleFields.Row]?.Value; + set => this.Set((int)_TransformViewTupleFields.Row, value); + } + + public string Data + { + get => (string)this.Fields[(int)_TransformViewTupleFields.Data]?.Value; + set => this.Set((int)_TransformViewTupleFields.Data, value); + } + + public string Current + { + get => (string)this.Fields[(int)_TransformViewTupleFields.Current]?.Value; + set => this.Set((int)_TransformViewTupleFields.Current, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/_ValidationTuple.cs b/src/WixToolset.Data/Tuples/_ValidationTuple.cs new file mode 100644 index 00000000..3bcd064c --- /dev/null +++ b/src/WixToolset.Data/Tuples/_ValidationTuple.cs @@ -0,0 +1,116 @@ +// Copyright (c) .NET 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.Data +{ + using WixToolset.Data.Tuples; + + public static partial class TupleDefinitions + { + public static readonly IntermediateTupleDefinition _Validation = new IntermediateTupleDefinition( + TupleDefinitionType._Validation, + new[] + { + new IntermediateFieldDefinition(nameof(_ValidationTupleFields.Table), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(_ValidationTupleFields.Column), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(_ValidationTupleFields.Nullable), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(_ValidationTupleFields.MinValue), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(_ValidationTupleFields.MaxValue), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(_ValidationTupleFields.KeyTable), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(_ValidationTupleFields.KeyColumn), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(_ValidationTupleFields.Category), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(_ValidationTupleFields.Set), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(_ValidationTupleFields.Description), IntermediateFieldType.String), + }, + typeof(_ValidationTuple)); + } +} + +namespace WixToolset.Data.Tuples +{ + public enum _ValidationTupleFields + { + Table, + Column, + Nullable, + MinValue, + MaxValue, + KeyTable, + KeyColumn, + Category, + Set, + Description, + } + + public class _ValidationTuple : IntermediateTuple + { + public _ValidationTuple() : base(TupleDefinitions._Validation, null, null) + { + } + + public _ValidationTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions._Validation, sourceLineNumber, id) + { + } + + public IntermediateField this[_ValidationTupleFields index] => this.Fields[(int)index]; + + public string Table + { + get => (string)this.Fields[(int)_ValidationTupleFields.Table]?.Value; + set => this.Set((int)_ValidationTupleFields.Table, value); + } + + public string Column + { + get => (string)this.Fields[(int)_ValidationTupleFields.Column]?.Value; + set => this.Set((int)_ValidationTupleFields.Column, value); + } + + public string Nullable + { + get => (string)this.Fields[(int)_ValidationTupleFields.Nullable]?.Value; + set => this.Set((int)_ValidationTupleFields.Nullable, value); + } + + public int MinValue + { + get => (int)this.Fields[(int)_ValidationTupleFields.MinValue]?.Value; + set => this.Set((int)_ValidationTupleFields.MinValue, value); + } + + public int MaxValue + { + get => (int)this.Fields[(int)_ValidationTupleFields.MaxValue]?.Value; + set => this.Set((int)_ValidationTupleFields.MaxValue, value); + } + + public string KeyTable + { + get => (string)this.Fields[(int)_ValidationTupleFields.KeyTable]?.Value; + set => this.Set((int)_ValidationTupleFields.KeyTable, value); + } + + public int KeyColumn + { + get => (int)this.Fields[(int)_ValidationTupleFields.KeyColumn]?.Value; + set => this.Set((int)_ValidationTupleFields.KeyColumn, value); + } + + public string Category + { + get => (string)this.Fields[(int)_ValidationTupleFields.Category]?.Value; + set => this.Set((int)_ValidationTupleFields.Category, value); + } + + public string Set + { + get => (string)this.Fields[(int)_ValidationTupleFields.Set]?.Value; + set => this.Set((int)_ValidationTupleFields.Set, value); + } + + public string Description + { + get => (string)this.Fields[(int)_ValidationTupleFields.Description]?.Value; + set => this.Set((int)_ValidationTupleFields.Description, value); + } + } +} \ No newline at end of file diff --git a/src/WixToolset.Data/Tuples/tuples_new.json b/src/WixToolset.Data/Tuples/tuples_new.json new file mode 100644 index 00000000..9386058c --- /dev/null +++ b/src/WixToolset.Data/Tuples/tuples_new.json @@ -0,0 +1,3604 @@ +[ + { + "_Streams": [ + { + "Name": "string" + }, + { + "Data": "path" + } + ] + }, + { + "_SummaryInformation": [ + { + "PropertyId": "number" + }, + { + "Value": "string" + } + ] + }, + { + "_TransformView": [ + { + "Table": "string" + }, + { + "Column": "string" + }, + { + "Row": "string" + }, + { + "Data": "string" + }, + { + "Current": "string" + } + ] + }, + { + "_Validation": [ + { + "Table": "string" + }, + { + "Column": "string" + }, + { + "Nullable": "string" + }, + { + "MinValue": "number" + }, + { + "MaxValue": "number" + }, + { + "KeyTable": "string" + }, + { + "KeyColumn": "number" + }, + { + "Category": "string" + }, + { + "Set": "string" + }, + { + "Description": "string" + } + ] + }, + { + "ActionText": [ + { + "Action": "string" + }, + { + "Description": "string" + }, + { + "Template": "string" + } + ] + }, + { + "AdminExecuteSequence": [ + { + "Action": "string" + }, + { + "Condition": "string" + }, + { + "Sequence": "number" + } + ] + }, + { + "AdminUISequence": [ + { + "Action": "string" + }, + { + "Condition": "string" + }, + { + "Sequence": "number" + } + ] + }, + { + "AdvtExecuteSequence": [ + { + "Action": "string" + }, + { + "Condition": "string" + }, + { + "Sequence": "number" + } + ] + }, + { + "AdvtUISequence": [ + { + "Action": "string" + }, + { + "Condition": "string" + }, + { + "Sequence": "number" + } + ] + }, + { + "AppId": [ + { + "AppId": "string" + }, + { + "RemoteServerName": "string" + }, + { + "LocalService": "string" + }, + { + "ServiceParameters": "string" + }, + { + "DllSurrogate": "string" + }, + { + "ActivateAtStorage": "number" + }, + { + "RunAsInteractiveUser": "number" + } + ] + }, + { + "AppSearch": [ + { + "Property": "string" + }, + { + "Signature_": "string" + } + ] + }, + { + "BBControl": [ + { + "Billboard_": "string" + }, + { + "BBControl": "string" + }, + { + "Type": "string" + }, + { + "X": "number" + }, + { + "Y": "number" + }, + { + "Width": "number" + }, + { + "Height": "number" + }, + { + "Attributes": "number" + }, + { + "Text": "string" + } + ] + }, + { + "Billboard": [ + { + "Billboard": "string" + }, + { + "Feature_": "string" + }, + { + "Action": "string" + }, + { + "Ordering": "number" + } + ] + }, + { + "Binary": [ + { + "Name": "string" + }, + { + "Data": "path" + } + ] + }, + { + "BindImage": [ + { + "File_": "string" + }, + { + "Path": "string" + } + ] + }, + { + "CCPSearch": [ + { + "Signature_": "string" + } + ] + }, + { + "CheckBox": [ + { + "Property": "string" + }, + { + "Value": "string" + } + ] + }, + { + "Class": [ + { + "CLSID": "string" + }, + { + "Context": "string" + }, + { + "Component_": "string" + }, + { + "ProgId_Default": "string" + }, + { + "Description": "string" + }, + { + "AppId_": "string" + }, + { + "FileTypeMask": "string" + }, + { + "Icon_": "string" + }, + { + "IconIndex": "number" + }, + { + "DefInprocHandler": "string" + }, + { + "Argument": "string" + }, + { + "Feature_": "string" + }, + { + "Attributes": "number" + } + ] + }, + { + "ComboBox": [ + { + "Property": "string" + }, + { + "Order": "number" + }, + { + "Value": "string" + }, + { + "Text": "string" + } + ] + }, + { + "CompLocator": [ + { + "Signature_": "string" + }, + { + "ComponentId": "string" + }, + { + "Type": "number" + } + ] + }, + { + "Complus": [ + { + "Component_": "string" + }, + { + "ExpType": "number" + } + ] + }, + { + "Component": [ + { + "Component": "string" + }, + { + "ComponentId": "string" + }, + { + "Directory_": "string" + }, + { + "Attributes": "number" + }, + { + "Condition": "string" + }, + { + "KeyPath": "string" + } + ] + }, + { + "Condition": [ + { + "Feature_": "string" + }, + { + "Level": "number" + }, + { + "Condition": "string" + } + ] + }, + { + "Control": [ + { + "Dialog_": "string" + }, + { + "Control": "string" + }, + { + "Type": "string" + }, + { + "X": "number" + }, + { + "Y": "number" + }, + { + "Width": "number" + }, + { + "Height": "number" + }, + { + "Attributes": "number" + }, + { + "Property": "string" + }, + { + "Text": "string" + }, + { + "Control_Next": "string" + }, + { + "Help": "string" + } + ] + }, + { + "ControlCondition": [ + { + "Dialog_": "string" + }, + { + "Control_": "string" + }, + { + "Action": "string" + }, + { + "Condition": "string" + } + ] + }, + { + "ControlEvent": [ + { + "Dialog_": "string" + }, + { + "Control_": "string" + }, + { + "Event": "string" + }, + { + "Argument": "string" + }, + { + "Condition": "string" + }, + { + "Ordering": "number" + } + ] + }, + { + "CreateFolder": [ + { + "Directory_": "string" + }, + { + "Component_": "string" + } + ] + }, + { + "CustomAction": [ + { + "Action": "string" + }, + { + "Type": "number" + }, + { + "Source": "string" + }, + { + "Target": "string" + }, + { + "ExtendedType": "number" + } + ] + }, + { + "Dialog": [ + { + "Dialog": "string" + }, + { + "HCentering": "number" + }, + { + "VCentering": "number" + }, + { + "Width": "number" + }, + { + "Height": "number" + }, + { + "Attributes": "number" + }, + { + "Title": "string" + }, + { + "Control_First": "string" + }, + { + "Control_Default": "string" + }, + { + "Control_Cancel": "string" + } + ] + }, + { + "Directory": [ + { + "Directory": "string" + }, + { + "Directory_Parent": "string" + }, + { + "DefaultDir": "string" + } + ] + }, + { + "DrLocator": [ + { + "Signature_": "string" + }, + { + "Parent": "string" + }, + { + "Path": "string" + }, + { + "Depth": "number" + } + ] + }, + { + "DuplicateFile": [ + { + "FileKey": "string" + }, + { + "Component_": "string" + }, + { + "File_": "string" + }, + { + "DestName": "string" + }, + { + "DestFolder": "string" + } + ] + }, + { + "Environment": [ + { + "Environment": "string" + }, + { + "Name": "string" + }, + { + "Value": "string" + }, + { + "Component_": "string" + } + ] + }, + { + "Error": [ + { + "Error": "number" + }, + { + "Message": "string" + } + ] + }, + { + "EventMapping": [ + { + "Dialog_": "string" + }, + { + "Control_": "string" + }, + { + "Event": "string" + }, + { + "Attribute": "string" + } + ] + }, + { + "Extension": [ + { + "Extension": "string" + }, + { + "Component_": "string" + }, + { + "ProgId_": "string" + }, + { + "MIME_": "string" + }, + { + "Feature_": "string" + } + ] + }, + { + "ExternalFiles": [ + { + "Family": "string" + }, + { + "FTK": "string" + }, + { + "FilePath": "string" + }, + { + "SymbolPaths": "string" + }, + { + "IgnoreOffsets": "string" + }, + { + "IgnoreLengths": "string" + }, + { + "RetainOffsets": "string" + }, + { + "Order": "number" + } + ] + }, + { + "FamilyFileRanges": [ + { + "Family": "string" + }, + { + "FTK": "string" + }, + { + "RetainOffsets": "string" + }, + { + "RetainLengths": "string" + } + ] + }, + { + "Feature": [ + { + "Feature": "string" + }, + { + "Feature_Parent": "string" + }, + { + "Title": "string" + }, + { + "Description": "string" + }, + { + "Display": "number" + }, + { + "Level": "number" + }, + { + "Directory_": "string" + }, + { + "Attributes": "number" + } + ] + }, + { + "FeatureComponents": [ + { + "Feature_": "string" + }, + { + "Component_": "string" + } + ] + }, + { + "File": [ + { + "File": "string" + }, + { + "Component_": "string" + }, + { + "FileName": "string" + }, + { + "FileSize": "number" + }, + { + "Version": "string" + }, + { + "Language": "string" + }, + { + "Attributes": "number" + }, + { + "Sequence": "number" + } + ] + }, + { + "FileSFPCatalog": [ + { + "File_": "string" + }, + { + "SFPCatalog_": "string" + } + ] + }, + { + "Font": [ + { + "File_": "string" + }, + { + "FontTitle": "string" + } + ] + }, + { + "Icon": [ + { + "Name": "string" + }, + { + "Data": "path" + } + ] + }, + { + "ImageFamilies": [ + { + "Family": "string" + }, + { + "MediaSrcPropName": "string" + }, + { + "MediaDiskId": "number" + }, + { + "FileSequenceStart": "number" + }, + { + "DiskPrompt": "string" + }, + { + "VolumeLabel": "string" + } + ] + }, + { + "IniFile": [ + { + "IniFile": "string" + }, + { + "FileName": "string" + }, + { + "DirProperty": "string" + }, + { + "Section": "string" + }, + { + "Key": "string" + }, + { + "Value": "string" + }, + { + "Action": "number" + }, + { + "Component_": "string" + } + ] + }, + { + "IniLocator": [ + { + "Signature_": "string" + }, + { + "FileName": "string" + }, + { + "Section": "string" + }, + { + "Key": "string" + }, + { + "Field": "number" + }, + { + "Type": "number" + } + ] + }, + { + "InstallExecuteSequence": [ + { + "Action": "string" + }, + { + "Condition": "string" + }, + { + "Sequence": "number" + } + ] + }, + { + "InstallUISequence": [ + { + "Action": "string" + }, + { + "Condition": "string" + }, + { + "Sequence": "number" + } + ] + }, + { + "IsolatedComponent": [ + { + "Component_Shared": "string" + }, + { + "Component_Application": "string" + } + ] + }, + { + "LaunchCondition": [ + { + "Condition": "string" + }, + { + "Description": "string" + } + ] + }, + { + "ListBox": [ + { + "Property": "string" + }, + { + "Order": "number" + }, + { + "Value": "string" + }, + { + "Text": "string" + } + ] + }, + { + "ListView": [ + { + "Property": "string" + }, + { + "Order": "number" + }, + { + "Value": "string" + }, + { + "Text": "string" + }, + { + "Binary_": "string" + } + ] + }, + { + "LockPermissions": [ + { + "LockObject": "string" + }, + { + "Table": "string" + }, + { + "Domain": "string" + }, + { + "User": "string" + }, + { + "Permission": "number" + } + ] + }, + { + "Media": [ + { + "DiskId": "number" + }, + { + "LastSequence": "number" + }, + { + "DiskPrompt": "string" + }, + { + "Cabinet": "string" + }, + { + "VolumeLabel": "string" + }, + { + "Source": "string" + } + ] + }, + { + "MIME": [ + { + "ContentType": "string" + }, + { + "Extension_": "string" + }, + { + "CLSID": "string" + } + ] + }, + { + "ModuleAdminExecuteSequence": [ + { + "Action": "string" + }, + { + "Sequence": "number" + }, + { + "BaseAction": "string" + }, + { + "After": "number" + }, + { + "Condition": "string" + } + ] + }, + { + "ModuleAdminUISequence": [ + { + "Action": "string" + }, + { + "Sequence": "number" + }, + { + "BaseAction": "string" + }, + { + "After": "number" + }, + { + "Condition": "string" + } + ] + }, + { + "ModuleAdvtExecuteSequence": [ + { + "Action": "string" + }, + { + "Sequence": "number" + }, + { + "BaseAction": "string" + }, + { + "After": "number" + }, + { + "Condition": "string" + } + ] + }, + { + "ModuleAdvtUISequence": [ + { + "Action": "string" + }, + { + "Sequence": "number" + }, + { + "BaseAction": "string" + }, + { + "After": "number" + }, + { + "Condition": "string" + } + ] + }, + { + "ModuleComponents": [ + { + "Component": "string" + }, + { + "ModuleID": "string" + }, + { + "Language": "number" + } + ] + }, + { + "ModuleConfiguration": [ + { + "Name": "string" + }, + { + "Format": "number" + }, + { + "Type": "string" + }, + { + "ContextData": "string" + }, + { + "DefaultValue": "string" + }, + { + "Attributes": "number" + }, + { + "DisplayName": "string" + }, + { + "Description": "string" + }, + { + "HelpLocation": "string" + }, + { + "HelpKeyword": "string" + } + ] + }, + { + "ModuleDependency": [ + { + "ModuleID": "string" + }, + { + "ModuleLanguage": "number" + }, + { + "RequiredID": "string" + }, + { + "RequiredLanguage": "number" + }, + { + "RequiredVersion": "string" + } + ] + }, + { + "ModuleExclusion": [ + { + "ModuleID": "string" + }, + { + "ModuleLanguage": "number" + }, + { + "ExcludedID": "string" + }, + { + "ExcludedLanguage": "number" + }, + { + "ExcludedMinVersion": "string" + }, + { + "ExcludedMaxVersion": "string" + } + ] + }, + { + "ModuleIgnoreTable": [ + { + "Table": "string" + } + ] + }, + { + "ModuleInstallExecuteSequence": [ + { + "Action": "string" + }, + { + "Sequence": "number" + }, + { + "BaseAction": "string" + }, + { + "After": "number" + }, + { + "Condition": "string" + } + ] + }, + { + "ModuleInstallUISequence": [ + { + "Action": "string" + }, + { + "Sequence": "number" + }, + { + "BaseAction": "string" + }, + { + "After": "number" + }, + { + "Condition": "string" + } + ] + }, + { + "ModuleSignature": [ + { + "ModuleID": "string" + }, + { + "Language": "number" + }, + { + "Version": "string" + } + ] + }, + { + "ModuleSubstitution": [ + { + "Table": "string" + }, + { + "Row": "string" + }, + { + "Column": "string" + }, + { + "Value": "string" + } + ] + }, + { + "MoveFile": [ + { + "FileKey": "string" + }, + { + "Component_": "string" + }, + { + "SourceName": "string" + }, + { + "DestName": "string" + }, + { + "SourceFolder": "string" + }, + { + "DestFolder": "string" + }, + { + "Options": "number" + } + ] + }, + { + "MsiAssembly": [ + { + "Component_": "string" + }, + { + "Feature_": "string" + }, + { + "File_Manifest": "string" + }, + { + "File_Application": "string" + }, + { + "Attributes": "number" + } + ] + }, + { + "MsiAssemblyName": [ + { + "Component_": "string" + }, + { + "Name": "string" + }, + { + "Value": "string" + } + ] + }, + { + "MsiDigitalCertificate": [ + { + "DigitalCertificate": "string" + }, + { + "CertData": "path" + } + ] + }, + { + "MsiDigitalSignature": [ + { + "Table": "string" + }, + { + "SignObject": "string" + }, + { + "DigitalCertificate_": "string" + }, + { + "Hash": "path" + } + ] + }, + { + "MsiEmbeddedChainer": [ + { + "MsiEmbeddedChainer": "string" + }, + { + "Condition": "string" + }, + { + "CommandLine": "string" + }, + { + "Source": "string" + }, + { + "Type": "number" + } + ] + }, + { + "MsiEmbeddedUI": [ + { + "MsiEmbeddedUI": "string" + }, + { + "FileName": "string" + }, + { + "Attributes": "number" + }, + { + "MessageFilter": "number" + }, + { + "Data": "path" + } + ] + }, + { + "MsiFileHash": [ + { + "File_": "string" + }, + { + "Options": "number" + }, + { + "HashPart1": "number" + }, + { + "HashPart2": "number" + }, + { + "HashPart3": "number" + }, + { + "HashPart4": "number" + } + ] + }, + { + "MsiLockPermissionsEx": [ + { + "MsiLockPermissionsEx": "string" + }, + { + "LockObject": "string" + }, + { + "Table": "string" + }, + { + "SDDLText": "string" + }, + { + "Condition": "string" + } + ] + }, + { + "MsiPackageCertificate": [ + { + "PackageCertificate": "string" + }, + { + "DigitalCertificate_": "string" + } + ] + }, + { + "MsiPatchCertificate": [ + { + "PatchCertificate": "string" + }, + { + "DigitalCertificate_": "string" + } + ] + }, + { + "MsiPatchHeaders": [ + { + "StreamRef": "string" + }, + { + "Header": "path" + } + ] + }, + { + "MsiPatchMetadata": [ + { + "Company": "string" + }, + { + "Property": "string" + }, + { + "Value": "string" + } + ] + }, + { + "MsiPatchOldAssemblyFile": [ + { + "File_": "string" + }, + { + "Assembly_": "string" + } + ] + }, + { + "MsiPatchOldAssemblyName": [ + { + "Assembly": "string" + }, + { + "Name": "string" + }, + { + "Value": "string" + } + ] + }, + { + "MsiPatchSequence": [ + { + "PatchFamily": "string" + }, + { + "ProductCode": "string" + }, + { + "Sequence": "string" + }, + { + "Attributes": "number" + } + ] + }, + { + "MsiServiceConfig": [ + { + "MsiServiceConfig": "string" + }, + { + "Name": "string" + }, + { + "Event": "number" + }, + { + "ConfigType": "number" + }, + { + "Argument": "string" + }, + { + "Component_": "string" + } + ] + }, + { + "MsiServiceConfigFailureActions": [ + { + "MsiServiceConfigFailureActions": "string" + }, + { + "Name": "string" + }, + { + "Event": "number" + }, + { + "ResetPeriod": "number" + }, + { + "RebootMessage": "string" + }, + { + "Command": "string" + }, + { + "Actions": "string" + }, + { + "DelayActions": "string" + }, + { + "Component_": "string" + } + ] + }, + { + "MsiShortcutProperty": [ + { + "MsiShortcutProperty": "string" + }, + { + "Shortcut_": "string" + }, + { + "PropertyKey": "string" + }, + { + "PropVariantValue": "string" + } + ] + }, + { + "ODBCAttribute": [ + { + "Driver_": "string" + }, + { + "Attribute": "string" + }, + { + "Value": "string" + } + ] + }, + { + "ODBCDataSource": [ + { + "DataSource": "string" + }, + { + "Component_": "string" + }, + { + "Description": "string" + }, + { + "DriverDescription": "string" + }, + { + "Registration": "number" + } + ] + }, + { + "ODBCDriver": [ + { + "Driver": "string" + }, + { + "Component_": "string" + }, + { + "Description": "string" + }, + { + "File_": "string" + }, + { + "File_Setup": "string" + } + ] + }, + { + "ODBCSourceAttribute": [ + { + "DataSource_": "string" + }, + { + "Attribute": "string" + }, + { + "Value": "string" + } + ] + }, + { + "ODBCTranslator": [ + { + "Translator": "string" + }, + { + "Component_": "string" + }, + { + "Description": "string" + }, + { + "File_": "string" + }, + { + "File_Setup": "string" + } + ] + }, + { + "Patch": [ + { + "File_": "string" + }, + { + "Sequence": "number" + }, + { + "PatchSize": "number" + }, + { + "Attributes": "number" + }, + { + "Header": "path" + }, + { + "StreamRef_": "string" + } + ] + }, + { + "PatchMetadata": [ + { + "Company": "string" + }, + { + "Property": "string" + }, + { + "Value": "string" + } + ] + }, + { + "PatchPackage": [ + { + "PatchId": "string" + }, + { + "Media_": "number" + } + ] + }, + { + "PatchSequence": [ + { + "PatchFamily": "string" + }, + { + "Target": "string" + }, + { + "Sequence": "string" + }, + { + "Supersede": "number" + } + ] + }, + { + "ProgId": [ + { + "ProgId": "string" + }, + { + "ProgId_Parent": "string" + }, + { + "Class_": "string" + }, + { + "Description": "string" + }, + { + "Icon_": "string" + }, + { + "IconIndex": "number" + } + ] + }, + { + "Properties": [ + { + "Name": "string" + }, + { + "Value": "string" + } + ] + }, + { + "Property": [ + { + "Property": "string" + }, + { + "Value": "string" + } + ] + }, + { + "PublishComponent": [ + { + "ComponentId": "string" + }, + { + "Qualifier": "string" + }, + { + "Component_": "string" + }, + { + "AppData": "string" + }, + { + "Feature_": "string" + } + ] + }, + { + "RadioButton": [ + { + "Property": "string" + }, + { + "Order": "number" + }, + { + "Value": "string" + }, + { + "X": "number" + }, + { + "Y": "number" + }, + { + "Width": "number" + }, + { + "Height": "number" + }, + { + "Text": "string" + }, + { + "Help": "string" + } + ] + }, + { + "Registry": [ + { + "Registry": "string" + }, + { + "Root": "number" + }, + { + "Key": "string" + }, + { + "Name": "string" + }, + { + "Value": "string" + }, + { + "Component_": "string" + } + ] + }, + { + "RegLocator": [ + { + "Signature_": "string" + }, + { + "Root": "number" + }, + { + "Key": "string" + }, + { + "Name": "string" + }, + { + "Type": "number" + } + ] + }, + { + "RemoveFile": [ + { + "FileKey": "string" + }, + { + "Component_": "string" + }, + { + "FileName": "string" + }, + { + "DirProperty": "string" + }, + { + "InstallMode": "number" + } + ] + }, + { + "RemoveIniFile": [ + { + "RemoveIniFile": "string" + }, + { + "FileName": "string" + }, + { + "DirProperty": "string" + }, + { + "Section": "string" + }, + { + "Key": "string" + }, + { + "Value": "string" + }, + { + "Action": "number" + }, + { + "Component_": "string" + } + ] + }, + { + "RemoveRegistry": [ + { + "RemoveRegistry": "string" + }, + { + "Root": "number" + }, + { + "Key": "string" + }, + { + "Name": "string" + }, + { + "Component_": "string" + } + ] + }, + { + "ReserveCost": [ + { + "ReserveKey": "string" + }, + { + "Component_": "string" + }, + { + "ReserveFolder": "string" + }, + { + "ReserveLocal": "number" + }, + { + "ReserveSource": "number" + } + ] + }, + { + "SelfReg": [ + { + "File_": "string" + }, + { + "Cost": "number" + } + ] + }, + { + "ServiceControl": [ + { + "ServiceControl": "string" + }, + { + "Name": "string" + }, + { + "Event": "number" + }, + { + "Arguments": "string" + }, + { + "Wait": "number" + }, + { + "Component_": "string" + } + ] + }, + { + "ServiceInstall": [ + { + "ServiceInstall": "string" + }, + { + "Name": "string" + }, + { + "DisplayName": "string" + }, + { + "ServiceType": "number" + }, + { + "StartType": "number" + }, + { + "ErrorControl": "number" + }, + { + "LoadOrderGroup": "string" + }, + { + "Dependencies": "string" + }, + { + "StartName": "string" + }, + { + "Password": "string" + }, + { + "Arguments": "string" + }, + { + "Component_": "string" + }, + { + "Description": "string" + } + ] + }, + { + "SFPCatalog": [ + { + "SFPCatalog": "string" + }, + { + "Catalog": "path" + }, + { + "Dependency": "string" + } + ] + }, + { + "Shortcut": [ + { + "Shortcut": "string" + }, + { + "Directory_": "string" + }, + { + "Name": "string" + }, + { + "Component_": "string" + }, + { + "Target": "string" + }, + { + "Arguments": "string" + }, + { + "Description": "string" + }, + { + "Hotkey": "number" + }, + { + "Icon_": "string" + }, + { + "IconIndex": "number" + }, + { + "ShowCmd": "number" + }, + { + "WkDir": "string" + }, + { + "DisplayResourceDLL": "string" + }, + { + "DisplayResourceId": "number" + }, + { + "DescriptionResourceDLL": "string" + }, + { + "DescriptionResourceId": "number" + } + ] + }, + { + "Signature": [ + { + "Signature": "string" + }, + { + "FileName": "string" + }, + { + "MinVersion": "string" + }, + { + "MaxVersion": "string" + }, + { + "MinSize": "number" + }, + { + "MaxSize": "number" + }, + { + "MinDate": "number" + }, + { + "MaxDate": "number" + }, + { + "Languages": "string" + } + ] + }, + { + "TargetFiles_OptionalData": [ + { + "Target": "string" + }, + { + "FTK": "string" + }, + { + "SymbolPaths": "string" + }, + { + "IgnoreOffsets": "string" + }, + { + "IgnoreLengths": "string" + }, + { + "RetainOffsets": "string" + } + ] + }, + { + "TargetImages": [ + { + "Target": "string" + }, + { + "MsiPath": "string" + }, + { + "SymbolPaths": "string" + }, + { + "Upgraded": "string" + }, + { + "Order": "number" + }, + { + "ProductValidateFlags": "string" + }, + { + "IgnoreMissingSrcFiles": "number" + } + ] + }, + { + "TextStyle": [ + { + "TextStyle": "string" + }, + { + "FaceName": "string" + }, + { + "Size": "number" + }, + { + "Color": "number" + }, + { + "StyleBits": "number" + } + ] + }, + { + "TypeLib": [ + { + "LibID": "string" + }, + { + "Language": "number" + }, + { + "Component_": "string" + }, + { + "Version": "number" + }, + { + "Description": "string" + }, + { + "Directory_": "string" + }, + { + "Feature_": "string" + }, + { + "Cost": "number" + } + ] + }, + { + "UIText": [ + { + "Key": "string" + }, + { + "Text": "string" + } + ] + }, + { + "Upgrade": [ + { + "UpgradeCode": "string" + }, + { + "VersionMin": "string" + }, + { + "VersionMax": "string" + }, + { + "Language": "string" + }, + { + "Attributes": "number" + }, + { + "Remove": "string" + }, + { + "ActionProperty": "string" + } + ] + }, + { + "UpgradedFiles_OptionalData": [ + { + "Upgraded": "string" + }, + { + "FTK": "string" + }, + { + "SymbolPaths": "string" + }, + { + "AllowIgnoreOnPatchError": "number" + }, + { + "IncludeWholeFile": "number" + } + ] + }, + { + "UpgradedFilesToIgnore": [ + { + "Upgraded": "string" + }, + { + "FTK": "string" + } + ] + }, + { + "UpgradedImages": [ + { + "Upgraded": "string" + }, + { + "MsiPath": "string" + }, + { + "PatchMsiPath": "string" + }, + { + "SymbolPaths": "string" + }, + { + "Family": "string" + } + ] + }, + { + "Verb": [ + { + "Extension_": "string" + }, + { + "Verb": "string" + }, + { + "Sequence": "number" + }, + { + "Command": "string" + }, + { + "Argument": "string" + } + ] + }, + { + "WixAction": [ + { + "SequenceTable": "string" + }, + { + "Action": "string" + }, + { + "Condition": "string" + }, + { + "Sequence": "number" + }, + { + "Before": "string" + }, + { + "After": "string" + }, + { + "Overridable": "number" + } + ] + }, + { + "WixApprovedExeForElevation": [ + { + "Id": "string" + }, + { + "Key": "string" + }, + { + "Value": "string" + }, + { + "Attributes": "number" + } + ] + }, + { + "WixBBControl": [ + { + "Billboard_": "string" + }, + { + "BBControl_": "string" + }, + { + "SourceFile": "path" + } + ] + }, + { + "WixBindUpdatedFiles": [ + { + "File_": "string" + } + ] + }, + { + "WixBootstrapperApplication": [ + { + "Id": "string" + } + ] + }, + { + "WixBuildInfo": [ + { + "WixVersion": "string" + }, + { + "WixOutputFile": "string" + }, + { + "WixProjectFile": "string" + }, + { + "WixPdbFile": "string" + } + ] + }, + { + "WixBundle": [ + { + "Version": "string" + }, + { + "Copyright": "string" + }, + { + "Name": "string" + }, + { + "AboutUrl": "string" + }, + { + "DisableModify": "number" + }, + { + "DisableRemove": "number" + }, + { + "DisableRepair": "number" + }, + { + "HelpTelephone": "string" + }, + { + "HelpUrl": "string" + }, + { + "Manufacturer": "string" + }, + { + "UpdateUrl": "string" + }, + { + "Compressed": "number" + }, + { + "LogPrefixAndExtension": "string" + }, + { + "IconSourceFile": "path" + }, + { + "SplashScreenSourceFile": "path" + }, + { + "Condition": "string" + }, + { + "Tag": "string" + }, + { + "Platform": "string" + }, + { + "ParentName": "string" + }, + { + "UpgradeCode": "string" + }, + { + "BundleId": "string" + }, + { + "ProviderKey": "string" + }, + { + "PerMachine": "number" + } + ] + }, + { + "WixBundleCatalog": [ + { + "WixBundleCatalog": "string" + }, + { + "Payload_": "string" + } + ] + }, + { + "WixBundleContainer": [ + { + "WixBundleContainer": "string" + }, + { + "Name": "string" + }, + { + "Type": "number" + }, + { + "DownloadUrl": "string" + }, + { + "Size": "number" + }, + { + "Hash": "string" + }, + { + "AttachedContainerIndex": "number" + }, + { + "WorkingPath": "string" + } + ] + }, + { + "WixBundleExePackage": [ + { + "WixBundlePackage_": "string" + }, + { + "Attributes": "number" + }, + { + "DetectCondition": "string" + }, + { + "InstallCommand": "string" + }, + { + "RepairCommand": "string" + }, + { + "UninstallCommand": "string" + }, + { + "ExeProtocol": "string" + } + ] + }, + { + "WixBundleMsiFeature": [ + { + "WixBundlePackage_": "string" + }, + { + "Name": "string" + }, + { + "Size": "number" + }, + { + "Parent": "string" + }, + { + "Title": "string" + }, + { + "Description": "string" + }, + { + "Display": "number" + }, + { + "Level": "number" + }, + { + "Directory": "string" + }, + { + "Attributes": "number" + } + ] + }, + { + "WixBundleMsiPackage": [ + { + "WixBundlePackage_": "string" + }, + { + "Attributes": "number" + }, + { + "ProductCode": "string" + }, + { + "UpgradeCode": "string" + }, + { + "ProductVersion": "string" + }, + { + "ProductLanguage": "number" + }, + { + "ProductName": "string" + }, + { + "Manufacturer": "string" + } + ] + }, + { + "WixBundleMsiProperty": [ + { + "WixBundlePackage_": "string" + }, + { + "Name": "string" + }, + { + "Value": "string" + }, + { + "Condition": "string" + } + ] + }, + { + "WixBundleMspPackage": [ + { + "WixBundlePackage_": "string" + }, + { + "Attributes": "number" + }, + { + "PatchCode": "string" + }, + { + "Manufacturer": "string" + }, + { + "PatchXml": "string" + } + ] + }, + { + "WixBundleMsuPackage": [ + { + "WixBundlePackage_": "string" + }, + { + "DetectCondition": "string" + }, + { + "MsuKB": "string" + } + ] + }, + { + "WixBundlePackage": [ + { + "WixChainItem_": "string" + }, + { + "Type": "number" + }, + { + "Payload_": "string" + }, + { + "Attributes": "number" + }, + { + "InstallCondition": "string" + }, + { + "Cache": "number" + }, + { + "CacheId": "string" + }, + { + "Vital": "number" + }, + { + "PerMachine": "number" + }, + { + "LogPathVariable": "string" + }, + { + "RollbackLogPathVariable": "string" + }, + { + "Size": "number" + }, + { + "InstallSize": "number" + }, + { + "Version": "string" + }, + { + "Language": "number" + }, + { + "DisplayName": "string" + }, + { + "Description": "string" + }, + { + "RollbackBoundary_": "string" + }, + { + "RollbackBoundaryBackward_": "string" + }, + { + "x64": "number" + } + ] + }, + { + "WixBundlePackageCommandLine": [ + { + "WixBundlePackage_": "string" + }, + { + "InstallArgument": "string" + }, + { + "UninstallArgument": "string" + }, + { + "RepairArgument": "string" + }, + { + "Condition": "string" + } + ] + }, + { + "WixBundlePackageExitCode": [ + { + "WixBundlePackage_": "string" + }, + { + "Code": "number" + }, + { + "Behavior": "number" + } + ] + }, + { + "WixBundlePackageGroup": [ + { + "WixBundlePackageGroup": "string" + } + ] + }, + { + "WixBundlePatchTargetCode": [ + { + "PackageId": "string" + }, + { + "TargetCode": "string" + }, + { + "Attributes": "number" + } + ] + }, + { + "WixBundlePayload": [ + { + "WixBundlePayload": "string" + }, + { + "Name": "string" + }, + { + "SourceFile": "path" + }, + { + "DownloadUrl": "string" + }, + { + "Compressed": "number" + }, + { + "UnresolvedSourceFile": "string" + }, + { + "DisplayName": "string" + }, + { + "Description": "string" + }, + { + "EnableSignatureValidation": "number" + }, + { + "FileSize": "number" + }, + { + "Version": "string" + }, + { + "Hash": "string" + }, + { + "PublicKey": "string" + }, + { + "Thumbprint": "string" + }, + { + "Catalog_": "string" + }, + { + "Container_": "string" + }, + { + "Package": "string" + }, + { + "ContentFile": "number" + }, + { + "EmbeddedId": "string" + }, + { + "LayoutOnly": "number" + }, + { + "Packaging": "number" + }, + { + "ParentPackagePayload_": "string" + } + ] + }, + { + "WixBundlePayloadGroup": [ + { + "WixBundlePayloadGroup": "string" + } + ] + }, + { + "WixBundleProperties": [ + { + "DisplayName": "string" + }, + { + "LogPathVariable": "string" + }, + { + "Compressed": "string" + }, + { + "Id": "string" + }, + { + "UpgradeCode": "string" + }, + { + "PerMachine": "string" + } + ] + }, + { + "WixBundleRelatedPackage": [ + { + "WixBundlePackage_": "string" + }, + { + "Id": "string" + }, + { + "MinVersion": "string" + }, + { + "MaxVersion": "string" + }, + { + "Languages": "string" + }, + { + "MinInclusive": "number" + }, + { + "MaxInclusive": "number" + }, + { + "LangInclusive": "number" + }, + { + "OnlyDetect": "number" + } + ] + }, + { + "WixBundleRollbackBoundary": [ + { + "WixChainItem_": "string" + }, + { + "Vital": "number" + }, + { + "Transaction": "number" + } + ] + }, + { + "WixBundleSlipstreamMsp": [ + { + "WixBundlePackage_": "string" + }, + { + "WixBundlePackage_Msp": "string" + } + ] + }, + { + "WixBundleUpdate": [ + { + "Location": "string" + }, + { + "Attributes": "number" + } + ] + }, + { + "WixBundleVariable": [ + { + "WixBundleVariable": "string" + }, + { + "Value": "string" + }, + { + "Type": "string" + }, + { + "Hidden": "number" + }, + { + "Persisted": "number" + } + ] + }, + { + "WixChain": [ + { + "Attributes": "number" + } + ] + }, + { + "WixChainItem": [ + { + "Id": "string" + } + ] + }, + { + "WixComplexReference": [ + { + "Parent": "string" + }, + { + "ParentAttributes": "number" + }, + { + "ParentLanguage": "string" + }, + { + "Child": "string" + }, + { + "ChildAttributes": "number" + }, + { + "Attributes": "number" + } + ] + }, + { + "WixComponentGroup": [ + { + "WixComponentGroup": "string" + } + ] + }, + { + "WixComponentSearch": [ + { + "WixSearch_": "string" + }, + { + "Guid": "string" + }, + { + "ProductCode": "string" + }, + { + "Attributes": "number" + } + ] + }, + { + "WixControl": [ + { + "Dialog_": "string" + }, + { + "Control_": "string" + }, + { + "SourceFile": "path" + } + ] + }, + { + "WixCustomRow": [ + { + "Table": "string" + }, + { + "FieldData": "string" + } + ] + }, + { + "WixCustomTable": [ + { + "Table": "string" + }, + { + "ColumnCount": "number" + }, + { + "ColumnNames": "string" + }, + { + "ColumnTypes": "string" + }, + { + "PrimaryKeys": "string" + }, + { + "MinValues": "string" + }, + { + "MaxValues": "string" + }, + { + "KeyTables": "string" + }, + { + "KeyColumns": "string" + }, + { + "Categories": "string" + }, + { + "Sets": "string" + }, + { + "Descriptions": "string" + }, + { + "Modularizations": "string" + }, + { + "BootstrapperApplicationData": "number" + } + ] + }, + { + "WixDeltaPatchFile": [ + { + "File_": "string" + }, + { + "RetainLengths": "preserved" + }, + { + "IgnoreOffsets": "preserved" + }, + { + "IgnoreLengths": "preserved" + }, + { + "RetainOffsets": "preserved" + }, + { + "SymbolPaths": "preserved" + } + ] + }, + { + "WixDeltaPatchSymbolPaths": [ + { + "Id": "string" + }, + { + "Type": "number" + }, + { + "SymbolPaths": "preserved" + } + ] + }, + { + "WixDirectory": [ + { + "Directory_": "string" + }, + { + "ComponentGuidGenerationSeed": "string" + } + ] + }, + { + "WixEnsureTable": [ + { + "Table": "string" + } + ] + }, + { + "WixFeatureGroup": [ + { + "WixFeatureGroup": "string" + } + ] + }, + { + "WixFeatureModules": [ + { + "Feature_": "string" + }, + { + "WixMerge_": "string" + } + ] + }, + { + "WixFile": [ + { + "File_": "string" + }, + { + "AssemblyType": "number" + }, + { + "File_AssemblyManifest": "string" + }, + { + "File_AssemblyApplication": "string" + }, + { + "Directory_": "string" + }, + { + "DiskId": "number" + }, + { + "Source": "path" + }, + { + "ProcessorArchitecture": "string" + }, + { + "PatchGroup": "number" + }, + { + "Attributes": "number" + }, + { + "PatchAttributes": "number" + }, + { + "DeltaPatchHeaderSource": "string" + } + ] + }, + { + "WixFileSearch": [ + { + "WixSearch_": "string" + }, + { + "Path": "string" + }, + { + "MinVersion": "string" + }, + { + "MaxVersion": "string" + }, + { + "MinSize": "number" + }, + { + "MaxSize": "number" + }, + { + "MinDate": "number" + }, + { + "MaxDate": "number" + }, + { + "Languages": "string" + }, + { + "Attributes": "number" + } + ] + }, + { + "WixFragment": [ + { + "WixFragment": "string" + } + ] + }, + { + "WixGroup": [ + { + "ParentId": "string" + }, + { + "ParentType": "string" + }, + { + "ChildId": "string" + }, + { + "ChildType": "string" + } + ] + }, + { + "WixInstanceComponent": [ + { + "Component_": "string" + } + ] + }, + { + "WixInstanceTransforms": [ + { + "Id": "string" + }, + { + "PropertyId": "string" + }, + { + "ProductCode": "string" + }, + { + "ProductName": "string" + }, + { + "UpgradeCode": "string" + } + ] + }, + { + "WixMedia": [ + { + "DiskId_": "number" + }, + { + "CompressionLevel": "number" + }, + { + "Layout": "string" + } + ] + }, + { + "WixMediaTemplate": [ + { + "CabinetTemplate": "string" + }, + { + "CompressionLevel": "number" + }, + { + "DiskPrompt": "string" + }, + { + "VolumeLabel": "string" + }, + { + "MaximumUncompressedMediaSize": "number" + }, + { + "MaximumCabinetSizeForLargeFileSplitting": "number" + } + ] + }, + { + "WixMerge": [ + { + "WixMerge": "string" + }, + { + "Language": "number" + }, + { + "Directory_": "string" + }, + { + "SourceFile": "path" + }, + { + "DiskId": "number" + }, + { + "FileCompression": "number" + }, + { + "ConfigurationData": "string" + }, + { + "Feature_": "string" + } + ] + }, + { + "WixOrdering": [ + { + "ItemType": "string" + }, + { + "ItemId_": "string" + }, + { + "DependsOnType": "string" + }, + { + "DependsOnId_": "string" + } + ] + }, + { + "WixPackageFeatureInfo": [ + { + "Package": "string" + }, + { + "Feature": "string" + }, + { + "Size": "string" + }, + { + "Parent": "string" + }, + { + "Title": "string" + }, + { + "Description": "string" + }, + { + "Display": "string" + }, + { + "Level": "string" + }, + { + "Directory": "string" + }, + { + "Attributes": "string" + } + ] + }, + { + "WixPackageProperties": [ + { + "Package": "string" + }, + { + "Vital": "string" + }, + { + "DisplayName": "string" + }, + { + "Description": "string" + }, + { + "DownloadSize": "string" + }, + { + "PackageSize": "string" + }, + { + "InstalledSize": "string" + }, + { + "PackageType": "string" + }, + { + "Permanent": "string" + }, + { + "LogPathVariable": "string" + }, + { + "RollbackLogPathVariable": "string" + }, + { + "Compressed": "string" + }, + { + "DisplayInternalUI": "string" + }, + { + "ProductCode": "string" + }, + { + "UpgradeCode": "string" + }, + { + "Version": "string" + }, + { + "InstallCondition": "string" + }, + { + "Cache": "string" + } + ] + }, + { + "WixPatchBaseline": [ + { + "WixPatchBaseline": "string" + }, + { + "DiskId": "number" + }, + { + "ValidationFlags": "number" + } + ] + }, + { + "WixPatchFamilyGroup": [ + { + "WixPatchFamilyGroup": "string" + } + ] + }, + { + "WixPatchId": [ + { + "ProductCode": "string" + }, + { + "ClientPatchId": "string" + }, + { + "OptimizePatchSizeForLargeFiles": "number" + }, + { + "ApiPatchingSymbolFlags": "number" + } + ] + }, + { + "WixPatchMetadata": [ + { + "Property": "string" + }, + { + "Value": "string" + } + ] + }, + { + "WixPatchRef": [ + { + "Table": "string" + }, + { + "PrimaryKeys": "string" + } + ] + }, + { + "WixPatchTarget": [ + { + "ProductCode": "string" + } + ] + }, + { + "WixPayloadProperties": [ + { + "Payload": "string" + }, + { + "Package": "string" + }, + { + "Container": "string" + }, + { + "Name": "string" + }, + { + "Size": "string" + }, + { + "DownloadUrl": "string" + }, + { + "LayoutOnly": "string" + } + ] + }, + { + "WixProductSearch": [ + { + "WixSearch_": "string" + }, + { + "Guid": "string" + }, + { + "Attributes": "number" + } + ] + }, + { + "WixProperty": [ + { + "Property_": "string" + }, + { + "Attributes": "number" + } + ] + }, + { + "WixRegistrySearch": [ + { + "WixSearch_": "string" + }, + { + "Root": "number" + }, + { + "Key": "string" + }, + { + "Value": "string" + }, + { + "Attributes": "number" + } + ] + }, + { + "WixRelatedBundle": [ + { + "Id": "string" + }, + { + "Action": "number" + } + ] + }, + { + "WixSearch": [ + { + "WixSearch": "string" + }, + { + "Variable": "string" + }, + { + "Condition": "string" + } + ] + }, + { + "WixSearchRelation": [ + { + "WixSearch_": "string" + }, + { + "ParentId_": "string" + }, + { + "Attributes": "number" + } + ] + }, + { + "WixSimpleReference": [ + { + "Table": "string" + }, + { + "PrimaryKeys": "string" + } + ] + }, + { + "WixSuppressAction": [ + { + "SequenceTable": "string" + }, + { + "Action": "string" + } + ] + }, + { + "WixSuppressModularization": [ + { + "WixSuppressModularization": "string" + } + ] + }, + { + "WixUI": [ + { + "WixUI": "string" + } + ] + }, + { + "WixUpdateRegistration": [ + { + "Manufacturer": "string" + }, + { + "Department": "string" + }, + { + "ProductFamily": "string" + }, + { + "Name": "string" + }, + { + "Classification": "string" + } + ] + }, + { + "WixVariable": [ + { + "WixVariable": "string" + }, + { + "Value": "string" + }, + { + "Attributes": "number" + } + ] + } +] \ No newline at end of file diff --git a/src/WixToolset.Data/WindowsInstallerStandard.cs b/src/WixToolset.Data/WindowsInstallerStandard.cs deleted file mode 100644 index 1060d11b..00000000 --- a/src/WixToolset.Data/WindowsInstallerStandard.cs +++ /dev/null @@ -1,444 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Data -{ - using System.Collections.Generic; - using System.Reflection; - using System.Xml; - using WixToolset.Data.Rows; - - /// - /// Represents the Windows Installer standard objects. - /// - public static class WindowsInstallerStandard - { - private static readonly object lockObject = new object(); - - private static TableDefinitionCollection tableDefinitions; - private static WixActionRowCollection standardActions; - - private static HashSet standardActionNames; - private static HashSet standardDirectories; - private static HashSet standardProperties; - - - /// - /// Gets the table definitions stored in this assembly. - /// - /// Table definition collection for tables stored in this assembly. - public static TableDefinitionCollection GetTableDefinitions() - { - lock (lockObject) - { - if (null == WindowsInstallerStandard.tableDefinitions) - { - using (XmlReader reader = XmlReader.Create(Assembly.GetExecutingAssembly().GetManifestResourceStream("WixToolset.Data.Data.tables.xml"))) - { - tableDefinitions = TableDefinitionCollection.Load(reader); - } - } - } - - return WindowsInstallerStandard.tableDefinitions; - } - - /// - /// Gets the standard actions stored in this assembly. - /// - /// Collection of standard actions in this assembly. - public static WixActionRowCollection GetStandardActions() - { - lock (lockObject) - { - if (null == standardActions) - { - using (XmlReader reader = XmlReader.Create(Assembly.GetExecutingAssembly().GetManifestResourceStream("WixToolset.Data.Data.actions.xml"))) - { - standardActions = WixActionRowCollection.Load(reader); - } - } - } - - return standardActions; - } - - - /// - /// Gets (and loads if not yet loaded) the list of standard MSI directories. - /// - /// The list of standard MSI directories. - public static HashSet GetStandardDirectories() - { - lock (lockObject) - { - if (null == standardDirectories) - { - LoadStandardDirectories(); - } - } - - return standardDirectories; - } - - /// - /// Find out if an action is a standard action. - /// - /// Name of the action. - /// true if the action is standard, false otherwise. - public static bool IsStandardAction(string actionName) - { - lock (lockObject) - { - if (null == standardActionNames) - { - standardActionNames = new HashSet(); - standardActionNames.Add("AllocateRegistrySpace"); - standardActionNames.Add("AppSearch"); - standardActionNames.Add("BindImage"); - standardActionNames.Add("CCPSearch"); - standardActionNames.Add("CostFinalize"); - standardActionNames.Add("CostInitialize"); - standardActionNames.Add("CreateFolders"); - standardActionNames.Add("CreateShortcuts"); - standardActionNames.Add("DeleteServices"); - standardActionNames.Add("DisableRollback"); - standardActionNames.Add("DuplicateFiles"); - standardActionNames.Add("ExecuteAction"); - standardActionNames.Add("FileCost"); - standardActionNames.Add("FindRelatedProducts"); - standardActionNames.Add("ForceReboot"); - standardActionNames.Add("InstallAdminPackage"); - standardActionNames.Add("InstallExecute"); - standardActionNames.Add("InstallExecuteAgain"); - standardActionNames.Add("InstallFiles"); - standardActionNames.Add("InstallFinalize"); - standardActionNames.Add("InstallInitialize"); - standardActionNames.Add("InstallODBC"); - standardActionNames.Add("InstallServices"); - standardActionNames.Add("InstallSFPCatalogFile"); - standardActionNames.Add("InstallValidate"); - standardActionNames.Add("IsolateComponents"); - standardActionNames.Add("LaunchConditions"); - standardActionNames.Add("MigrateFeatureStates"); - standardActionNames.Add("MoveFiles"); - standardActionNames.Add("MsiConfigureServices"); - standardActionNames.Add("MsiPublishAssemblies"); - standardActionNames.Add("MsiUnpublishAssemblies"); - standardActionNames.Add("PatchFiles"); - standardActionNames.Add("ProcessComponents"); - standardActionNames.Add("PublishComponents"); - standardActionNames.Add("PublishFeatures"); - standardActionNames.Add("PublishProduct"); - standardActionNames.Add("RegisterClassInfo"); - standardActionNames.Add("RegisterComPlus"); - standardActionNames.Add("RegisterExtensionInfo"); - standardActionNames.Add("RegisterFonts"); - standardActionNames.Add("RegisterMIMEInfo"); - standardActionNames.Add("RegisterProduct"); - standardActionNames.Add("RegisterProgIdInfo"); - standardActionNames.Add("RegisterTypeLibraries"); - standardActionNames.Add("RegisterUser"); - standardActionNames.Add("RemoveDuplicateFiles"); - standardActionNames.Add("RemoveEnvironmentStrings"); - standardActionNames.Add("RemoveExistingProducts"); - standardActionNames.Add("RemoveFiles"); - standardActionNames.Add("RemoveFolders"); - standardActionNames.Add("RemoveIniValues"); - standardActionNames.Add("RemoveODBC"); - standardActionNames.Add("RemoveRegistryValues"); - standardActionNames.Add("RemoveShortcuts"); - standardActionNames.Add("ResolveSource"); - standardActionNames.Add("RMCCPSearch"); - standardActionNames.Add("ScheduleReboot"); - standardActionNames.Add("SelfRegModules"); - standardActionNames.Add("SelfUnregModules"); - standardActionNames.Add("SetODBCFolders"); - standardActionNames.Add("StartServices"); - standardActionNames.Add("StopServices"); - standardActionNames.Add("UnpublishComponents"); - standardActionNames.Add("UnpublishFeatures"); - standardActionNames.Add("UnregisterClassInfo"); - standardActionNames.Add("UnregisterComPlus"); - standardActionNames.Add("UnregisterExtensionInfo"); - standardActionNames.Add("UnregisterFonts"); - standardActionNames.Add("UnregisterMIMEInfo"); - standardActionNames.Add("UnregisterProgIdInfo"); - standardActionNames.Add("UnregisterTypeLibraries"); - standardActionNames.Add("ValidateProductID"); - standardActionNames.Add("WriteEnvironmentStrings"); - standardActionNames.Add("WriteIniValues"); - standardActionNames.Add("WriteRegistryValues"); - } - } - - return standardActionNames.Contains(actionName); - } - - /// - /// Find out if a directory is a standard directory. - /// - /// Name of the directory. - /// true if the directory is standard, false otherwise. - public static bool IsStandardDirectory(string directoryName) - { - lock (lockObject) - { - if (null == standardDirectories) - { - LoadStandardDirectories(); - } - } - - return standardDirectories.Contains(directoryName); - } - - /// - /// Find out if a property is a standard property. - /// References: - /// Title: Property Reference [Windows Installer]: - /// URL: http://msdn.microsoft.com/library/en-us/msi/setup/property_reference.asp - /// - /// Name of the property. - /// true if a property is standard, false otherwise. - public static bool IsStandardProperty(string propertyName) - { - lock (lockObject) - { - if (null == standardProperties) - { - standardProperties = new HashSet(); - standardProperties.Add("~"); // REG_MULTI_SZ/NULL marker - standardProperties.Add("ACTION"); - standardProperties.Add("ADDDEFAULT"); - standardProperties.Add("ADDLOCAL"); - standardProperties.Add("ADDDSOURCE"); - standardProperties.Add("AdminProperties"); - standardProperties.Add("AdminUser"); - standardProperties.Add("ADVERTISE"); - standardProperties.Add("AFTERREBOOT"); - standardProperties.Add("AllowProductCodeMismatches"); - standardProperties.Add("AllowProductVersionMajorMismatches"); - standardProperties.Add("ALLUSERS"); - standardProperties.Add("Alpha"); - standardProperties.Add("ApiPatchingSymbolFlags"); - standardProperties.Add("ARPAUTHORIZEDCDFPREFIX"); - standardProperties.Add("ARPCOMMENTS"); - standardProperties.Add("ARPCONTACT"); - standardProperties.Add("ARPHELPLINK"); - standardProperties.Add("ARPHELPTELEPHONE"); - standardProperties.Add("ARPINSTALLLOCATION"); - standardProperties.Add("ARPNOMODIFY"); - standardProperties.Add("ARPNOREMOVE"); - standardProperties.Add("ARPNOREPAIR"); - standardProperties.Add("ARPPRODUCTIONICON"); - standardProperties.Add("ARPREADME"); - standardProperties.Add("ARPSIZE"); - standardProperties.Add("ARPSYSTEMCOMPONENT"); - standardProperties.Add("ARPULRINFOABOUT"); - standardProperties.Add("ARPURLUPDATEINFO"); - standardProperties.Add("AVAILABLEFREEREG"); - standardProperties.Add("BorderSize"); - standardProperties.Add("BorderTop"); - standardProperties.Add("CaptionHeight"); - standardProperties.Add("CCP_DRIVE"); - standardProperties.Add("ColorBits"); - standardProperties.Add("COMPADDLOCAL"); - standardProperties.Add("COMPADDSOURCE"); - standardProperties.Add("COMPANYNAME"); - standardProperties.Add("ComputerName"); - standardProperties.Add("CostingComplete"); - standardProperties.Add("Date"); - standardProperties.Add("DefaultUIFont"); - standardProperties.Add("DISABLEADVTSHORTCUTS"); - standardProperties.Add("DISABLEMEDIA"); - standardProperties.Add("DISABLEROLLBACK"); - standardProperties.Add("DiskPrompt"); - standardProperties.Add("DontRemoveTempFolderWhenFinished"); - standardProperties.Add("EnableUserControl"); - standardProperties.Add("EXECUTEACTION"); - standardProperties.Add("EXECUTEMODE"); - standardProperties.Add("FASTOEM"); - standardProperties.Add("FILEADDDEFAULT"); - standardProperties.Add("FILEADDLOCAL"); - standardProperties.Add("FILEADDSOURCE"); - standardProperties.Add("IncludeWholeFilesOnly"); - standardProperties.Add("Installed"); - standardProperties.Add("INSTALLLEVEL"); - standardProperties.Add("Intel"); - standardProperties.Add("Intel64"); - standardProperties.Add("IsAdminPackage"); - standardProperties.Add("LeftUnit"); - standardProperties.Add("LIMITUI"); - standardProperties.Add("ListOfPatchGUIDsToReplace"); - standardProperties.Add("ListOfTargetProductCode"); - standardProperties.Add("LOGACTION"); - standardProperties.Add("LogonUser"); - standardProperties.Add("Manufacturer"); - standardProperties.Add("MEDIAPACKAGEPATH"); - standardProperties.Add("MediaSourceDir"); - standardProperties.Add("MinimumRequiredMsiVersion"); - standardProperties.Add("MsiAMD64"); - standardProperties.Add("MSIAPRSETTINGSIDENTIFIER"); - standardProperties.Add("MSICHECKCRCS"); - standardProperties.Add("MSIDISABLERMRESTART"); - standardProperties.Add("MSIENFORCEUPGRADECOMPONENTRULES"); - standardProperties.Add("MSIFASTINSTALL"); - standardProperties.Add("MsiFileToUseToCreatePatchTables"); - standardProperties.Add("MsiHiddenProperties"); - standardProperties.Add("MSIINSTALLPERUSER"); - standardProperties.Add("MSIINSTANCEGUID"); - standardProperties.Add("MsiLogFileLocation"); - standardProperties.Add("MsiLogging"); - standardProperties.Add("MsiNetAssemblySupport"); - standardProperties.Add("MSINEWINSTANCE"); - standardProperties.Add("MSINODISABLEMEDIA"); - standardProperties.Add("MsiNTProductType"); - standardProperties.Add("MsiNTSuiteBackOffice"); - standardProperties.Add("MsiNTSuiteDataCenter"); - standardProperties.Add("MsiNTSuiteEnterprise"); - standardProperties.Add("MsiNTSuiteSmallBusiness"); - standardProperties.Add("MsiNTSuiteSmallBusinessRestricted"); - standardProperties.Add("MsiNTSuiteWebServer"); - standardProperties.Add("MsiNTSuitePersonal"); - standardProperties.Add("MsiPatchRemovalList"); - standardProperties.Add("MSIPATCHREMOVE"); - standardProperties.Add("MSIRESTARTMANAGERCONTROL"); - standardProperties.Add("MsiRestartManagerSessionKey"); - standardProperties.Add("MSIRMSHUTDOWN"); - standardProperties.Add("MsiRunningElevated"); - standardProperties.Add("MsiUIHideCancel"); - standardProperties.Add("MsiUIProgressOnly"); - standardProperties.Add("MsiUISourceResOnly"); - standardProperties.Add("MsiSystemRebootPending"); - standardProperties.Add("MsiWin32AssemblySupport"); - standardProperties.Add("NOCOMPANYNAME"); - standardProperties.Add("NOUSERNAME"); - standardProperties.Add("OLEAdvtSupport"); - standardProperties.Add("OptimizePatchSizeForLargeFiles"); - standardProperties.Add("OriginalDatabase"); - standardProperties.Add("OutOfDiskSpace"); - standardProperties.Add("OutOfNoRbDiskSpace"); - standardProperties.Add("ParentOriginalDatabase"); - standardProperties.Add("ParentProductCode"); - standardProperties.Add("PATCH"); - standardProperties.Add("PATCH_CACHE_DIR"); - standardProperties.Add("PATCH_CACHE_ENABLED"); - standardProperties.Add("PatchGUID"); - standardProperties.Add("PATCHNEWPACKAGECODE"); - standardProperties.Add("PATCHNEWSUMMARYCOMMENTS"); - standardProperties.Add("PATCHNEWSUMMARYSUBJECT"); - standardProperties.Add("PatchOutputPath"); - standardProperties.Add("PatchSourceList"); - standardProperties.Add("PhysicalMemory"); - standardProperties.Add("PIDKEY"); - standardProperties.Add("PIDTemplate"); - standardProperties.Add("Preselected"); - standardProperties.Add("PRIMARYFOLDER"); - standardProperties.Add("PrimaryVolumePath"); - standardProperties.Add("PrimaryVolumeSpaceAvailable"); - standardProperties.Add("PrimaryVolumeSpaceRemaining"); - standardProperties.Add("PrimaryVolumeSpaceRequired"); - standardProperties.Add("Privileged"); - standardProperties.Add("ProductCode"); - standardProperties.Add("ProductID"); - standardProperties.Add("ProductLanguage"); - standardProperties.Add("ProductName"); - standardProperties.Add("ProductState"); - standardProperties.Add("ProductVersion"); - standardProperties.Add("PROMPTROLLBACKCOST"); - standardProperties.Add("REBOOT"); - standardProperties.Add("REBOOTPROMPT"); - standardProperties.Add("RedirectedDllSupport"); - standardProperties.Add("REINSTALL"); - standardProperties.Add("REINSTALLMODE"); - standardProperties.Add("RemoveAdminTS"); - standardProperties.Add("REMOVE"); - standardProperties.Add("ReplacedInUseFiles"); - standardProperties.Add("RestrictedUserControl"); - standardProperties.Add("RESUME"); - standardProperties.Add("RollbackDisabled"); - standardProperties.Add("ROOTDRIVE"); - standardProperties.Add("ScreenX"); - standardProperties.Add("ScreenY"); - standardProperties.Add("SecureCustomProperties"); - standardProperties.Add("ServicePackLevel"); - standardProperties.Add("ServicePackLevelMinor"); - standardProperties.Add("SEQUENCE"); - standardProperties.Add("SharedWindows"); - standardProperties.Add("ShellAdvtSupport"); - standardProperties.Add("SHORTFILENAMES"); - standardProperties.Add("SourceDir"); - standardProperties.Add("SOURCELIST"); - standardProperties.Add("SystemLanguageID"); - standardProperties.Add("TARGETDIR"); - standardProperties.Add("TerminalServer"); - standardProperties.Add("TextHeight"); - standardProperties.Add("Time"); - standardProperties.Add("TRANSFORMS"); - standardProperties.Add("TRANSFORMSATSOURCE"); - standardProperties.Add("TRANSFORMSSECURE"); - standardProperties.Add("TTCSupport"); - standardProperties.Add("UILevel"); - standardProperties.Add("UpdateStarted"); - standardProperties.Add("UpgradeCode"); - standardProperties.Add("UPGRADINGPRODUCTCODE"); - standardProperties.Add("UserLanguageID"); - standardProperties.Add("USERNAME"); - standardProperties.Add("UserSID"); - standardProperties.Add("Version9X"); - standardProperties.Add("VersionDatabase"); - standardProperties.Add("VersionMsi"); - standardProperties.Add("VersionNT"); - standardProperties.Add("VersionNT64"); - standardProperties.Add("VirtualMemory"); - standardProperties.Add("WindowsBuild"); - standardProperties.Add("WindowsVolume"); - } - } - - return standardProperties.Contains(propertyName); - } - - /// - /// Sets up a hashtable with the set of standard MSI directories - /// - private static void LoadStandardDirectories() - { - lock (lockObject) - { - if (null == standardDirectories) - { - standardDirectories = new HashSet(); - standardDirectories.Add("TARGETDIR"); - standardDirectories.Add("AdminToolsFolder"); - standardDirectories.Add("AppDataFolder"); - standardDirectories.Add("CommonAppDataFolder"); - standardDirectories.Add("CommonFilesFolder"); - standardDirectories.Add("DesktopFolder"); - standardDirectories.Add("FavoritesFolder"); - standardDirectories.Add("FontsFolder"); - standardDirectories.Add("LocalAppDataFolder"); - standardDirectories.Add("MyPicturesFolder"); - standardDirectories.Add("PersonalFolder"); - standardDirectories.Add("ProgramFilesFolder"); - standardDirectories.Add("ProgramMenuFolder"); - standardDirectories.Add("SendToFolder"); - standardDirectories.Add("StartMenuFolder"); - standardDirectories.Add("StartupFolder"); - standardDirectories.Add("System16Folder"); - standardDirectories.Add("SystemFolder"); - standardDirectories.Add("TempFolder"); - standardDirectories.Add("TemplateFolder"); - standardDirectories.Add("WindowsFolder"); - standardDirectories.Add("CommonFiles64Folder"); - standardDirectories.Add("ProgramFiles64Folder"); - standardDirectories.Add("System64Folder"); - standardDirectories.Add("NetHoodFolder"); - standardDirectories.Add("PrintHoodFolder"); - standardDirectories.Add("RecentFolder"); - standardDirectories.Add("WindowsVolume"); - } - } - } - } -} diff --git a/src/WixToolset.Data/WixDataStrings.Designer.cs b/src/WixToolset.Data/WixDataStrings.Designer.cs index 27c2b22c..37cced32 100644 --- a/src/WixToolset.Data/WixDataStrings.Designer.cs +++ b/src/WixToolset.Data/WixDataStrings.Designer.cs @@ -14,7 +14,7 @@ namespace WixToolset.Data { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class WixDataStrings { + public class WixDataStrings { private static global::System.Resources.ResourceManager resourceMan; @@ -64,7 +64,7 @@ namespace WixToolset.Data { /// /// Looks up a localized string similar to The value '{0}' is not a legal identifier and therefore cannot be modularized.. /// - internal static string EXP_CannotModularizeIllegalID { + public static string EXP_CannotModularizeIllegalID { get { return ResourceManager.GetString("EXP_CannotModularizeIllegalID", resourceCulture); } @@ -73,7 +73,7 @@ namespace WixToolset.Data { /// /// Looks up a localized string similar to A Merge table FileCompression column cannot be set to the invalid value '{0}'.. /// - internal static string EXP_CannotSetMergeTableFileCompressionColumnToInvalidValue { + public static string EXP_CannotSetMergeTableFileCompressionColumnToInvalidValue { get { return ResourceManager.GetString("EXP_CannotSetMergeTableFileCompressionColumnToInvalidValue", resourceCulture); } @@ -154,7 +154,7 @@ namespace WixToolset.Data { /// /// Looks up a localized string similar to A Merge table FileCompression column contains an invalid value '{0}'.. /// - internal static string EXP_MergeTableFileCompressionColumnContainsInvalidValue { + public static string EXP_MergeTableFileCompressionColumnContainsInvalidValue { get { return ResourceManager.GetString("EXP_MergeTableFileCompressionColumnContainsInvalidValue", resourceCulture); } @@ -190,7 +190,7 @@ namespace WixToolset.Data { /// /// Looks up a localized string similar to Unexpected entry section type: {0}. /// - internal static string EXP_UnexpectedEntrySectionType { + public static string EXP_UnexpectedEntrySectionType { get { return ResourceManager.GetString("EXP_UnexpectedEntrySectionType", resourceCulture); } @@ -199,7 +199,7 @@ namespace WixToolset.Data { /// /// Looks up a localized string similar to Unknown column type: {0}. /// - internal static string EXP_UnknownColumnType { + public static string EXP_UnknownColumnType { get { return ResourceManager.GetString("EXP_UnknownColumnType", resourceCulture); } @@ -217,7 +217,7 @@ namespace WixToolset.Data { /// /// Looks up a localized string similar to The table {0} is not supported.. /// - internal static string EXP_UnsupportedTable { + public static string EXP_UnsupportedTable { get { return ResourceManager.GetString("EXP_UnsupportedTable", resourceCulture); } diff --git a/src/WixToolset.Data/WixInvalidIdtException.cs b/src/WixToolset.Data/WixInvalidIdtException.cs deleted file mode 100644 index 33fd0591..00000000 --- a/src/WixToolset.Data/WixInvalidIdtException.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Data -{ - using System; - - /// - /// WiX invalid idt exception. - /// - [Serializable] - public sealed class WixInvalidIdtException : WixException - { - /// - /// Instantiate a new WixInvalidIdtException. - /// - /// The invalid idt file. - public WixInvalidIdtException(string idtFile) : - base(WixDataErrors.InvalidIdt(new SourceLineNumber(idtFile), idtFile)) - { - } - - /// - /// Instantiate a new WixInvalidIdtException. - /// - /// The invalid idt file. - /// The table name of the invalid idt file. - public WixInvalidIdtException(string idtFile, string tableName) : - base(WixDataErrors.InvalidIdt(new SourceLineNumber(idtFile), idtFile, tableName)) - { - } - } -} diff --git a/src/WixToolset.Data/WixMissingTableDefinitionException.cs b/src/WixToolset.Data/WixMissingTableDefinitionException.cs deleted file mode 100644 index 6295813b..00000000 --- a/src/WixToolset.Data/WixMissingTableDefinitionException.cs +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Data -{ - using System; - - /// - /// Exception thrown when a table definition is missing. - /// - [Serializable] - public class WixMissingTableDefinitionException : WixException - { - /// - /// Instantiate new WixMissingTableDefinitionException. - /// - /// Localized error information. - public WixMissingTableDefinitionException(MessageEventArgs error) - : base(error) - { - } - } -} diff --git a/src/WixToolset.Data/WixToolset.Data.csproj b/src/WixToolset.Data/WixToolset.Data.csproj index e57f61ed..e8032768 100644 --- a/src/WixToolset.Data/WixToolset.Data.csproj +++ b/src/WixToolset.Data/WixToolset.Data.csproj @@ -10,11 +10,6 @@ - - - - -