mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-17 01:25:40 -05:00
Adding EditCell constructor validation (#301)
* New unit tests! * New CopyTo method! * New null validation! YEAH!!!
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
//
|
||||
|
||||
using Microsoft.SqlTools.Utility;
|
||||
|
||||
namespace Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts
|
||||
{
|
||||
/// <summary>
|
||||
@@ -24,5 +26,18 @@ namespace Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts
|
||||
/// The raw object for the cell, for use internally
|
||||
/// </summary>
|
||||
internal object RawObject { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Copies the values of this DbCellValue into another DbCellValue (or child object)
|
||||
/// </summary>
|
||||
/// <param name="other">The DbCellValue (or child) that will receive the values</param>
|
||||
public virtual void CopyTo(DbCellValue other)
|
||||
{
|
||||
Validate.IsNotNull(nameof(other), other);
|
||||
|
||||
other.DisplayValue = DisplayValue;
|
||||
other.IsNull = IsNull;
|
||||
other.RawObject = RawObject;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user