diff options
| author | Rob Mensching <rob@firegiant.com> | 2017-09-17 15:35:20 -0700 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2017-09-17 16:00:11 -0700 |
| commit | d3d3649a68cb1fa589fdd987a6690dbd5d671f0d (patch) | |
| tree | 44fe37ee352b7e3a355cc1e08b1d7d5988c14cc0 /src/WixToolset.Core/Link/ConnectToFeature.cs | |
| parent | a62610d23d6feb98be3b1e529a4e81b19d77d9d8 (diff) | |
| download | wix-d3d3649a68cb1fa589fdd987a6690dbd5d671f0d.tar.gz wix-d3d3649a68cb1fa589fdd987a6690dbd5d671f0d.tar.bz2 wix-d3d3649a68cb1fa589fdd987a6690dbd5d671f0d.zip | |
Initial code commit
Diffstat (limited to 'src/WixToolset.Core/Link/ConnectToFeature.cs')
| -rw-r--r-- | src/WixToolset.Core/Link/ConnectToFeature.cs | 95 |
1 files changed, 95 insertions, 0 deletions
diff --git a/src/WixToolset.Core/Link/ConnectToFeature.cs b/src/WixToolset.Core/Link/ConnectToFeature.cs new file mode 100644 index 00000000..6e046b89 --- /dev/null +++ b/src/WixToolset.Core/Link/ConnectToFeature.cs | |||
| @@ -0,0 +1,95 @@ | |||
| 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.Link | ||
| 4 | { | ||
| 5 | using System.Collections.Specialized; | ||
| 6 | using WixToolset.Data; | ||
| 7 | |||
| 8 | /// <summary> | ||
| 9 | /// Object that connects things (components/modules) to features. | ||
| 10 | /// </summary> | ||
| 11 | public sealed class ConnectToFeature | ||
| 12 | { | ||
| 13 | private Section section; | ||
| 14 | private string childId; | ||
| 15 | |||
| 16 | private string primaryFeature; | ||
| 17 | private bool explicitPrimaryFeature; | ||
| 18 | private StringCollection connectFeatures; | ||
| 19 | |||
| 20 | /// <summary> | ||
| 21 | /// Creates a new connect to feature. | ||
| 22 | /// </summary> | ||
| 23 | /// <param name="section">Section this connect belongs to.</param> | ||
| 24 | /// <param name="childId">Id of the child.</param> | ||
| 25 | public ConnectToFeature(Section section, string childId) : | ||
| 26 | this(section, childId, null, false) | ||
| 27 | { | ||
| 28 | } | ||
| 29 | |||
| 30 | /// <summary> | ||
| 31 | /// Creates a new connect to feature. | ||
| 32 | /// </summary> | ||
| 33 | /// <param name="section">Section this connect belongs to.</param> | ||
| 34 | /// <param name="childId">Id of the child.</param> | ||
| 35 | /// <param name="primaryFeature">Sets the primary feature for the connection.</param> | ||
| 36 | /// <param name="explicitPrimaryFeature">Sets if this is explicit primary.</param> | ||
| 37 | public ConnectToFeature(Section section, string childId, string primaryFeature, bool explicitPrimaryFeature) | ||
| 38 | { | ||
| 39 | this.section = section; | ||
| 40 | this.childId = childId; | ||
| 41 | |||
| 42 | this.primaryFeature = primaryFeature; | ||
| 43 | this.explicitPrimaryFeature = explicitPrimaryFeature; | ||
| 44 | |||
| 45 | this.connectFeatures = new StringCollection(); | ||
| 46 | } | ||
| 47 | |||
| 48 | /// <summary> | ||
| 49 | /// Gets the section. | ||
| 50 | /// </summary> | ||
| 51 | /// <value>Section.</value> | ||
| 52 | public Section Section | ||
| 53 | { | ||
| 54 | get { return this.section; } | ||
| 55 | } | ||
| 56 | |||
| 57 | /// <summary> | ||
| 58 | /// Gets the child identifier. | ||
| 59 | /// </summary> | ||
| 60 | /// <value>The child identifier.</value> | ||
| 61 | public string ChildId | ||
| 62 | { | ||
| 63 | get { return this.childId; } | ||
| 64 | } | ||
| 65 | |||
| 66 | /// <summary> | ||
| 67 | /// Gets or sets if the flag for if the primary feature was set explicitly. | ||
| 68 | /// </summary> | ||
| 69 | /// <value>The flag for if the primary feature was set explicitly.</value> | ||
| 70 | public bool IsExplicitPrimaryFeature | ||
| 71 | { | ||
| 72 | get { return this.explicitPrimaryFeature; } | ||
| 73 | set { this.explicitPrimaryFeature = value; } | ||
| 74 | } | ||
| 75 | |||
| 76 | /// <summary> | ||
| 77 | /// Gets or sets the primary feature. | ||
| 78 | /// </summary> | ||
| 79 | /// <value>The primary feature.</value> | ||
| 80 | public string PrimaryFeature | ||
| 81 | { | ||
| 82 | get { return this.primaryFeature; } | ||
| 83 | set { this.primaryFeature = value; } | ||
| 84 | } | ||
| 85 | |||
| 86 | /// <summary> | ||
| 87 | /// Gets the features connected to. | ||
| 88 | /// </summary> | ||
| 89 | /// <value>Features connected to.</value> | ||
| 90 | public StringCollection ConnectFeatures | ||
| 91 | { | ||
| 92 | get { return this.connectFeatures; } | ||
| 93 | } | ||
| 94 | } | ||
| 95 | } | ||
