From bd72c7efe687dfaca6d4fd3c0fc2b5a39d57df55 Mon Sep 17 00:00:00 2001 From: Roy Ben Shabat Date: Wed, 12 Aug 2020 02:12:46 +0300 Subject: More work on proc_doc. Fixed app crash on code editor selection. --- .../PPC/Tango.PPC.Shared/SQL/RemoteSqlDataSet.cs | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'Software/Visual_Studio/PPC/Tango.PPC.Shared/SQL/RemoteSqlDataSet.cs') diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Shared/SQL/RemoteSqlDataSet.cs b/Software/Visual_Studio/PPC/Tango.PPC.Shared/SQL/RemoteSqlDataSet.cs index 089908e5a..72b8d2eb2 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Shared/SQL/RemoteSqlDataSet.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Shared/SQL/RemoteSqlDataSet.cs @@ -9,17 +9,37 @@ using System.Threading.Tasks; namespace Tango.PPC.Shared.SQL { + /// + /// Represents remote database query result composed of rows and columns. + /// + /// + /// + /// + /// The following example demonstrates how to set the connected machine's demo state and query for the connected machine's jobs. + /// + /// + /// + /// public class RemoteSqlDataSet { + /// + /// Gets or sets the dataset columns. + /// public RemoteSqlColumnCollection Columns { get; set; } private ObservableCollection _rows; + /// + /// Gets or sets the dataset rows. + /// public ObservableCollection Rows { get { return _rows; } set { _rows = value; OnRowsChanged(); } } + /// + /// Initializes a new instance of the class. + /// public RemoteSqlDataSet() { Columns = new RemoteSqlColumnCollection(); @@ -61,6 +81,11 @@ namespace Tango.PPC.Shared.SQL } } + /// + /// Creates a new using the specified . + /// + /// The reader. + /// public static Task Load(SqlDataReader reader) { return Task.Factory.StartNew(() => @@ -100,11 +125,21 @@ namespace Tango.PPC.Shared.SQL }); } + /// + /// Returns a that represents this instance. + /// + /// + /// A that represents this instance. + /// public override string ToString() { return String.Join(", ", Columns.Select(x => x.Name)) + "\n" + String.Join(Environment.NewLine, Rows.Select(x => x.ToString())); } + /// + /// Formats this dataset as a string with columns and rows. + /// + /// public String ToTableString() { Dictionary columnsMaxLength = new Dictionary(); -- cgit v1.3.1