From a962b626a238dab205c7d0dccd52120081ccf5d3 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Sun, 16 May 2021 21:53:08 -0700 Subject: Update package Cache attribute to new attribute values Closes wixtoolset/issues#5125 --- src/api/wix/WixToolset.Data/BundleCacheType.cs | 19 ++++++++++++++++ .../Symbols/WixBundlePackageSymbol.cs | 4 ++-- src/api/wix/WixToolset.Data/YesNoAlwaysType.cs | 25 ---------------------- 3 files changed, 21 insertions(+), 27 deletions(-) create mode 100644 src/api/wix/WixToolset.Data/BundleCacheType.cs delete mode 100644 src/api/wix/WixToolset.Data/YesNoAlwaysType.cs (limited to 'src/api') diff --git a/src/api/wix/WixToolset.Data/BundleCacheType.cs b/src/api/wix/WixToolset.Data/BundleCacheType.cs new file mode 100644 index 00000000..7d297d4b --- /dev/null +++ b/src/api/wix/WixToolset.Data/BundleCacheType.cs @@ -0,0 +1,19 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Data +{ + /// + /// Keep, Remove, Force xml simple type. + /// + public enum BundleCacheType + { + /// The keep value. + Keep, + + /// The remove value. + Remove, + + /// The force value. + Force, + } +} diff --git a/src/api/wix/WixToolset.Data/Symbols/WixBundlePackageSymbol.cs b/src/api/wix/WixToolset.Data/Symbols/WixBundlePackageSymbol.cs index cbe7f761..3d1a6ce8 100644 --- a/src/api/wix/WixToolset.Data/Symbols/WixBundlePackageSymbol.cs +++ b/src/api/wix/WixToolset.Data/Symbols/WixBundlePackageSymbol.cs @@ -117,9 +117,9 @@ namespace WixToolset.Data.Symbols set => this.Set((int)WixBundlePackageSymbolFields.InstallCondition, value); } - public YesNoAlwaysType Cache + public BundleCacheType? Cache { - get => Enum.TryParse((string)this.Fields[(int)WixBundlePackageSymbolFields.Cache], true, out YesNoAlwaysType value) ? value : YesNoAlwaysType.NotSet; + get => Enum.TryParse((string)this.Fields[(int)WixBundlePackageSymbolFields.Cache], true, out BundleCacheType value) ? value : (BundleCacheType?)null; set => this.Set((int)WixBundlePackageSymbolFields.Cache, value.ToString().ToLowerInvariant()); } diff --git a/src/api/wix/WixToolset.Data/YesNoAlwaysType.cs b/src/api/wix/WixToolset.Data/YesNoAlwaysType.cs deleted file mode 100644 index 3b4ca5d7..00000000 --- a/src/api/wix/WixToolset.Data/YesNoAlwaysType.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 -{ - /// - /// Yes, No, Always xml simple type. - /// - public enum YesNoAlwaysType - { - /// Not a valid yes, no or always value. - IllegalValue = -2, - - /// Value not set; equivalent to null for reference types. - NotSet = -1, - - /// The no value. - No, - - /// The yes value. - Yes, - - /// The always value. - Always, - } -} -- cgit v1.2.3-55-g6feb