diff options
| author | Rob Mensching <rob@firegiant.com> | 2020-01-13 09:10:13 -0800 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2020-01-13 14:19:45 -0800 |
| commit | 94b941ee95a294228516097c269e27dfa41593ab (patch) | |
| tree | 208cb36a5a6a3e17f5d458cfaa679d6ca1a76e15 /src/WixToolset.Core.WindowsInstaller/Validator.cs | |
| parent | a2b1235d9c0dfba48b1badac428d89d1137da698 (diff) | |
| download | wix-94b941ee95a294228516097c269e27dfa41593ab.tar.gz wix-94b941ee95a294228516097c269e27dfa41593ab.tar.bz2 wix-94b941ee95a294228516097c269e27dfa41593ab.zip | |
Provide Record enumerator on View that disposes fetched Records
Diffstat (limited to 'src/WixToolset.Core.WindowsInstaller/Validator.cs')
| -rw-r--r-- | src/WixToolset.Core.WindowsInstaller/Validator.cs | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/src/WixToolset.Core.WindowsInstaller/Validator.cs b/src/WixToolset.Core.WindowsInstaller/Validator.cs index 1c9cdc2f..72b09ebc 100644 --- a/src/WixToolset.Core.WindowsInstaller/Validator.cs +++ b/src/WixToolset.Core.WindowsInstaller/Validator.cs | |||
| @@ -201,21 +201,13 @@ namespace WixToolset.Core.WindowsInstaller | |||
| 201 | List<string> actions = new List<string>(); | 201 | List<string> actions = new List<string>(); |
| 202 | using (View view = database.OpenExecuteView("SELECT `Action` FROM `_ICESequence` ORDER BY `Sequence`")) | 202 | using (View view = database.OpenExecuteView("SELECT `Action` FROM `_ICESequence` ORDER BY `Sequence`")) |
| 203 | { | 203 | { |
| 204 | while (true) | 204 | foreach (Record record in view.Records) |
| 205 | { | 205 | { |
| 206 | using (Record record = view.Fetch()) | 206 | string action = record.GetString(1); |
| 207 | { | ||
| 208 | if (null == record) | ||
| 209 | { | ||
| 210 | break; | ||
| 211 | } | ||
| 212 | 207 | ||
| 213 | string action = record.GetString(1); | 208 | if ((this.SuppressedICEs == null || !this.SuppressedICEs.Contains(action)) && (this.ICEs == null || this.ICEs.Contains(action))) |
| 214 | 209 | { | |
| 215 | if ((this.SuppressedICEs == null || !this.SuppressedICEs.Contains(action)) && (this.ICEs == null || this.ICEs.Contains(action))) | 210 | actions.Add(action); |
| 216 | { | ||
| 217 | actions.Add(action); | ||
| 218 | } | ||
| 219 | } | 211 | } |
| 220 | } | 212 | } |
| 221 | } | 213 | } |
