| 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.Core.Link |
| 4 | { |
| 5 | using System.Collections.Generic; |
| 6 | using WixToolset.Data; |
| 7 | |
| 8 | /// <summary> |
| 9 | /// Object that connects things (components/modules) to features. |
| 10 | /// </summary> |
| 11 | internal class ConnectToFeature |
| 12 | { |
| 13 | /// <summary> |
| 14 | /// Creates a new connect to feature. |
| 15 | /// </summary> |
| 16 | /// <param name="section">Section this connect belongs to.</param> |
| 17 | /// <param name="childId">Id of the child.</param> |
| 18 | /// <param name="primaryFeature">Sets the primary feature for the connection.</param> |
| 19 | /// <param name="explicitPrimaryFeature">Sets if this is explicit primary.</param> |
| 20 | public ConnectToFeature(IntermediateSection section, string childId, string primaryFeature, bool explicitPrimaryFeature) |
| 21 | { |
| 22 | this.Section = section; |
| 23 | this.ChildId = childId; |
| 24 | |
| 25 | this.PrimaryFeature = primaryFeature; |
| 26 | this.IsExplicitPrimaryFeature = explicitPrimaryFeature; |
| 27 | } |
| 28 | |
| 29 | /// <summary> |
| 30 | /// Gets the section. |
| 31 | /// </summary> |
| 32 | /// <value>Section.</value> |
| 33 | public IntermediateSection Section { get; } |
| 34 | |
| 35 | /// <summary> |
| 36 | /// Gets the child identifier. |
| 37 | /// </summary> |
| 38 | /// <value>The child identifier.</value> |
| 39 | public string ChildId { get; } |
| 40 | |
| 41 | /// <summary> |
| 42 | /// Gets or sets if the flag for if the primary feature was set explicitly. |
| 43 | /// </summary> |
| 44 | /// <value>The flag for if the primary feature was set explicitly.</value> |
| 45 | public bool IsExplicitPrimaryFeature { get; set; } |
| 46 | |
| 47 | /// <summary> |
| 48 | /// Gets or sets the primary feature. |
| 49 | /// </summary> |
| 50 | /// <value>The primary feature.</value> |
| 51 | public string PrimaryFeature { get; set; } |
| 52 | |
| 53 | /// <summary> |
| 54 | /// Gets the features connected to. |
| 55 | /// </summary> |
| 56 | /// <value>Features connected to.</value> |
| 57 | public List<string> ConnectFeatures { get; } = new List<string>(); |
| 58 | } |
| 59 | } |