From b5f53ee9181d70544b04d53ef8ae2ca8fc480125 Mon Sep 17 00:00:00 2001 From: Jake Norbut Date: Wed, 18 Dec 2019 10:10:04 -0600 Subject: [PATCH] adding csv_properties to TimeAndSalesVM.Row --- .../Modules/Market/TimeAndSales/TimeAndSalesVM.cs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/client/spark/Modules/Market/TimeAndSales/TimeAndSalesVM.cs b/src/client/spark/Modules/Market/TimeAndSales/TimeAndSalesVM.cs index e2b5b8139..ce68f2a9c 100644 --- a/src/client/spark/Modules/Market/TimeAndSales/TimeAndSalesVM.cs +++ b/src/client/spark/Modules/Market/TimeAndSales/TimeAndSalesVM.cs @@ -52,7 +52,7 @@ namespace mbts.spark { columns.Add(new RenderTextColumn(col_key, r => r[col_key], filter, filter_template, r => _get_aggressor_brush(r)) { id = col_id(col_key), Header = header, Width = width, sort_member_path = sort_member_path, horizontal_alignment = h_alignment } ); - + // be sure to load GridSettings AFTER the columns collection has been populated, the grid settings manager looks columns by id to apply the appropriate settings, // if the collection is not populated, the column settings will not be applied grid_settings_manager = new SimpleGridSettingsManager(columns, new Dictionary { }, row_vms); @@ -173,6 +173,19 @@ namespace mbts.spark { } } + static HashSet _properties_for_csv_export = new HashSet(new string[] { + nameof(security), + nameof(trade_key), + nameof(time), + nameof(price), + nameof(size), + nameof(aggressor_side), + }); + public static IEnumerable csv_properties => typeof(Row).GetProperties() + .Where(x => _properties_for_csv_export.Contains(x.Name) + ); + + public void raise_invalidated() => invalidated?.Invoke(); } }