mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-25 17:24:17 -05:00
Adding EditCell constructor validation (#301)
* New unit tests! * New CopyTo method! * New null validation! YEAH!!!
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
//
|
||||
|
||||
using Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts;
|
||||
using Microsoft.SqlTools.Utility;
|
||||
|
||||
namespace Microsoft.SqlTools.ServiceLayer.EditData.Contracts
|
||||
{
|
||||
@@ -24,11 +25,10 @@ namespace Microsoft.SqlTools.ServiceLayer.EditData.Contracts
|
||||
/// <param name="isDirty">Whether or not the edit cell is dirty</param>
|
||||
public EditCell(DbCellValue dbCellValue, bool isDirty)
|
||||
{
|
||||
IsDirty = isDirty;
|
||||
Validate.IsNotNull(nameof(dbCellValue), dbCellValue);
|
||||
dbCellValue.CopyTo(this);
|
||||
|
||||
DisplayValue = dbCellValue.DisplayValue;
|
||||
IsNull = dbCellValue.IsNull;
|
||||
RawObject = dbCellValue.RawObject;
|
||||
IsDirty = isDirty;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user