diff options
| author | Sean Hall <r.sean.hall@gmail.com> | 2019-12-11 19:34:47 +1100 |
|---|---|---|
| committer | Sean Hall <r.sean.hall@gmail.com> | 2019-12-11 20:10:40 +1000 |
| commit | 62352fabd541aaa9d0a2c957c4bdd4b9c682df9c (patch) | |
| tree | 941513045cb644553af582fc0722c853793a90dd /src/WixToolset.Mba.Core/SupportedFrameworkElementCollection.cs | |
| parent | ca118d0123624e4e1523eeb7a54eb56364d5876e (diff) | |
| download | wix-62352fabd541aaa9d0a2c957c4bdd4b9c682df9c.tar.gz wix-62352fabd541aaa9d0a2c957c4bdd4b9c682df9c.tar.bz2 wix-62352fabd541aaa9d0a2c957c4bdd4b9c682df9c.zip | |
Import files from BootstrapperCore repo.
Diffstat (limited to 'src/WixToolset.Mba.Core/SupportedFrameworkElementCollection.cs')
| -rw-r--r-- | src/WixToolset.Mba.Core/SupportedFrameworkElementCollection.cs | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/WixToolset.Mba.Core/SupportedFrameworkElementCollection.cs b/src/WixToolset.Mba.Core/SupportedFrameworkElementCollection.cs new file mode 100644 index 00000000..1a5aa2de --- /dev/null +++ b/src/WixToolset.Mba.Core/SupportedFrameworkElementCollection.cs | |||
| @@ -0,0 +1,36 @@ | |||
| 1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
| 2 | |||
| 3 | namespace WixToolset.BootstrapperCore | ||
| 4 | { | ||
| 5 | using System; | ||
| 6 | using System.Configuration; | ||
| 7 | using System.Diagnostics.CodeAnalysis; | ||
| 8 | |||
| 9 | /// <summary> | ||
| 10 | /// Handler for the supportedFramework collection. | ||
| 11 | /// </summary> | ||
| 12 | [SuppressMessage("Microsoft.Design", "CA1010:CollectionsShouldImplementGenericInterface")] | ||
| 13 | [ConfigurationCollection(typeof(SupportedFrameworkElement), AddItemName = "supportedFramework", CollectionType = ConfigurationElementCollectionType.BasicMap)] | ||
| 14 | public sealed class SupportedFrameworkElementCollection : ConfigurationElementCollection | ||
| 15 | { | ||
| 16 | public override ConfigurationElementCollectionType CollectionType | ||
| 17 | { | ||
| 18 | get { return ConfigurationElementCollectionType.BasicMap; } | ||
| 19 | } | ||
| 20 | |||
| 21 | protected override string ElementName | ||
| 22 | { | ||
| 23 | get { return "supportedFramework"; } | ||
| 24 | } | ||
| 25 | |||
| 26 | protected override ConfigurationElement CreateNewElement() | ||
| 27 | { | ||
| 28 | return new SupportedFrameworkElement(); | ||
| 29 | } | ||
| 30 | |||
| 31 | protected override object GetElementKey(ConfigurationElement element) | ||
| 32 | { | ||
| 33 | return (element as SupportedFrameworkElement).Version; | ||
| 34 | } | ||
| 35 | } | ||
| 36 | } | ||
