diff options
Diffstat (limited to 'src/WixToolset.Mba.Host/SupportedFrameworkElement.cs')
-rw-r--r-- | src/WixToolset.Mba.Host/SupportedFrameworkElement.cs | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/src/WixToolset.Mba.Host/SupportedFrameworkElement.cs b/src/WixToolset.Mba.Host/SupportedFrameworkElement.cs new file mode 100644 index 00000000..fe7fd2eb --- /dev/null +++ b/src/WixToolset.Mba.Host/SupportedFrameworkElement.cs | |||
@@ -0,0 +1,47 @@ | |||
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.Mba.Host | ||
4 | { | ||
5 | using System; | ||
6 | using System.Configuration; | ||
7 | |||
8 | /// <summary> | ||
9 | /// Handler for the supportedFramework configuration section. | ||
10 | /// </summary> | ||
11 | public sealed class SupportedFrameworkElement : ConfigurationElement | ||
12 | { | ||
13 | private static readonly ConfigurationProperty versionProperty = new ConfigurationProperty("version", typeof(string), null, ConfigurationPropertyOptions.IsRequired); | ||
14 | private static readonly ConfigurationProperty runtimeVersionProperty = new ConfigurationProperty("runtimeVersion", typeof(string)); | ||
15 | |||
16 | /// <summary> | ||
17 | /// Creates a new instance of the <see cref="SupportedFrameworkElement"/> class. | ||
18 | /// </summary> | ||
19 | public SupportedFrameworkElement() | ||
20 | { | ||
21 | } | ||
22 | |||
23 | /// <summary> | ||
24 | /// Gets the version of the supported framework. | ||
25 | /// </summary> | ||
26 | /// <remarks> | ||
27 | /// The assembly specified by this name must contain a value matching the NETFX version registry key under | ||
28 | /// "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP". | ||
29 | /// </remarks> | ||
30 | [ConfigurationProperty("version", IsRequired = true)] | ||
31 | public string Version | ||
32 | { | ||
33 | get { return (string)base[versionProperty]; } | ||
34 | set { base[versionProperty] = value; } | ||
35 | } | ||
36 | |||
37 | /// <summary> | ||
38 | /// Gets the runtime version required by this supported framework. | ||
39 | /// </summary> | ||
40 | [ConfigurationProperty("runtimeVersion", IsRequired = false)] | ||
41 | public string RuntimeVersion | ||
42 | { | ||
43 | get { return (string)base[runtimeVersionProperty]; } | ||
44 | set { base[runtimeVersionProperty] = value; } | ||
45 | } | ||
46 | } | ||
47 | } | ||