// // Copyright (c) Microsoft. All rights reserved. // 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 { /// /// Class used for internally passing results from a cell around. /// public class DbCellValue { /// /// Display value for the cell, suitable to be passed back to the client /// public string DisplayValue { get; set; } /// /// Whether or not the cell is NULL /// public bool IsNull { get; set; } /// /// Culture invariant display value for the cell, this value can later be used by the client to convert back to the original value. /// public string InvariantCultureDisplayValue { get; set; } /// /// The raw object for the cell, for use internally /// internal object RawObject { get; set; } /// /// The internal ID for the row. Should be used when directly referencing the row for edit /// or other purposes. /// public long RowId { get; set; } /// /// Copies the values of this DbCellValue into another DbCellValue (or child object) /// /// The DbCellValue (or child) that will receive the values public virtual void CopyTo(DbCellValue other) { Validate.IsNotNull(nameof(other), other); other.DisplayValue = DisplayValue; other.InvariantCultureDisplayValue = InvariantCultureDisplayValue; other.IsNull = IsNull; other.RawObject = RawObject; other.RowId = RowId; } } }