diff options
| author | Bob Arnson <bob@firegiant.com> | 2020-03-04 18:58:35 -0500 |
|---|---|---|
| committer | Bob Arnson <bob@firegiant.com> | 2020-03-04 19:00:41 -0500 |
| commit | ff99718c7f6dd09b6d42c9ef201955cedd81ad86 (patch) | |
| tree | a4892dacdf0b7439f92e26b989ba52f9425e9ceb /src | |
| parent | 45907a8635c462108046741cd6abddf5164938f1 (diff) | |
| download | wix-ff99718c7f6dd09b6d42c9ef201955cedd81ad86.tar.gz wix-ff99718c7f6dd09b6d42c9ef201955cedd81ad86.tar.bz2 wix-ff99718c7f6dd09b6d42c9ef201955cedd81ad86.zip | |
To make it easier to associate tuples with tables...
...add TupleDefinitionName to TableDefinition.
Diffstat (limited to 'src')
| -rw-r--r-- | src/WixToolset.Data/WindowsInstaller/TableDefinition.cs | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/src/WixToolset.Data/WindowsInstaller/TableDefinition.cs b/src/WixToolset.Data/WindowsInstaller/TableDefinition.cs index 4738ac82..527199b2 100644 --- a/src/WixToolset.Data/WindowsInstaller/TableDefinition.cs +++ b/src/WixToolset.Data/WindowsInstaller/TableDefinition.cs | |||
| @@ -27,18 +27,36 @@ namespace WixToolset.Data.WindowsInstaller | |||
| 27 | public TableDefinition(string name, IEnumerable<ColumnDefinition> columns, bool unreal = false) | 27 | public TableDefinition(string name, IEnumerable<ColumnDefinition> columns, bool unreal = false) |
| 28 | { | 28 | { |
| 29 | this.Name = name; | 29 | this.Name = name; |
| 30 | this.TupleDefinitionName = name; | ||
| 30 | this.Unreal = unreal; | 31 | this.Unreal = unreal; |
| 31 | |||
| 32 | this.Columns = columns.ToArray(); | 32 | this.Columns = columns.ToArray(); |
| 33 | } | 33 | } |
| 34 | 34 | ||
| 35 | /// <summary> | 35 | /// <summary> |
| 36 | /// Creates a table definition. | ||
| 37 | /// </summary> | ||
| 38 | /// <param name="name">Name of table to create.</param> | ||
| 39 | /// <param name="tupleDefinitionName">Optional name of tuple definition for this table.</param> | ||
| 40 | /// <param name="columns">Column definitions for the table.</param> | ||
| 41 | /// <param name="unreal">Flag if table is unreal.</param> | ||
| 42 | public TableDefinition(string name, string tupleDefinitionName, IEnumerable<ColumnDefinition> columns, bool unreal = false) : this(name, columns, unreal) | ||
| 43 | { | ||
| 44 | this.TupleDefinitionName = tupleDefinitionName ?? name; | ||
| 45 | } | ||
| 46 | |||
| 47 | /// <summary> | ||
| 36 | /// Gets the name of the table. | 48 | /// Gets the name of the table. |
| 37 | /// </summary> | 49 | /// </summary> |
| 38 | /// <value>Name of the table.</value> | 50 | /// <value>Name of the table.</value> |
| 39 | public string Name { get; private set; } | 51 | public string Name { get; private set; } |
| 40 | 52 | ||
| 41 | /// <summary> | 53 | /// <summary> |
| 54 | /// Gets the name of the tuple definition associated with this table. | ||
| 55 | /// </summary> | ||
| 56 | /// <value>Name of the tuple definition.</value> | ||
| 57 | public string TupleDefinitionName { get; private set; } | ||
| 58 | |||
| 59 | /// <summary> | ||
| 42 | /// Gets if the table is unreal. | 60 | /// Gets if the table is unreal. |
| 43 | /// </summary> | 61 | /// </summary> |
| 44 | /// <value>Flag if table is unreal.</value> | 62 | /// <value>Flag if table is unreal.</value> |
| @@ -110,6 +128,7 @@ namespace WixToolset.Data.WindowsInstaller | |||
| 110 | { | 128 | { |
| 111 | var empty = reader.IsEmptyElement; | 129 | var empty = reader.IsEmptyElement; |
| 112 | string name = null; | 130 | string name = null; |
| 131 | string tupleDefinitionName = null; | ||
| 113 | var unreal = false; | 132 | var unreal = false; |
| 114 | var bootstrapperApplicationData = false; | 133 | var bootstrapperApplicationData = false; |
| 115 | 134 | ||
| @@ -120,6 +139,9 @@ namespace WixToolset.Data.WindowsInstaller | |||
| 120 | case "name": | 139 | case "name": |
| 121 | name = reader.Value; | 140 | name = reader.Value; |
| 122 | break; | 141 | break; |
| 142 | case "tupleDefinitionName": | ||
| 143 | tupleDefinitionName = reader.Value; | ||
| 144 | break; | ||
| 123 | case "unreal": | 145 | case "unreal": |
| 124 | unreal = reader.Value.Equals("yes"); | 146 | unreal = reader.Value.Equals("yes"); |
| 125 | break; | 147 | break; |
| @@ -176,7 +198,7 @@ namespace WixToolset.Data.WindowsInstaller | |||
| 176 | } | 198 | } |
| 177 | } | 199 | } |
| 178 | 200 | ||
| 179 | return new TableDefinition(name, columns.ToArray(), unreal); | 201 | return new TableDefinition(name, tupleDefinitionName, columns.ToArray(), unreal); |
| 180 | } | 202 | } |
| 181 | 203 | ||
| 182 | /// <summary> | 204 | /// <summary> |
