From b2e187154d8c89954a8659c3bd19c3dc89fdfbce Mon Sep 17 00:00:00 2001 From: Bob Arnson Date: Fri, 21 Aug 2020 17:12:53 -0400 Subject: Remove serialization classes and add Row.IsColumnNull. --- src/WixToolset.Data/WindowsInstaller/Row.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/WixToolset.Data/WindowsInstaller/Row.cs') diff --git a/src/WixToolset.Data/WindowsInstaller/Row.cs b/src/WixToolset.Data/WindowsInstaller/Row.cs index 8c847c5b..f44082d3 100644 --- a/src/WixToolset.Data/WindowsInstaller/Row.cs +++ b/src/WixToolset.Data/WindowsInstaller/Row.cs @@ -195,6 +195,13 @@ namespace WixToolset.Data.WindowsInstaller return foundPrimaryKey ? primaryKey.ToString() : null; } + /// + /// Returns true if the specified field is null. + /// + /// Index of the field to check. + /// true if the specified field is null, false otherwise. + public bool IsColumnNull(int field) => this.Fields[field].Data == null; + /// /// Returns true if the specified field is null or an empty string. /// @@ -202,7 +209,7 @@ namespace WixToolset.Data.WindowsInstaller /// true if the specified field is null or an empty string, false otherwise. public bool IsColumnEmpty(int field) { - if (null == this.Fields[field].Data) + if (this.IsColumnNull(field)) { return true; } -- cgit v1.2.3-55-g6feb