adding csv_properties to TimeAndSalesVM.Row
This commit is contained in:
1 parent
efc175f654
commit
b5f53ee918
1 file changed
+14
-1
@@ -52,7 +52,7 @@ namespace mbts.spark {
|
||||
columns.Add(new RenderTextColumn<Row, TimeAndSalesView.Columns>(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<Row>(columns, new Dictionary<string, GridColumnSettingsFeatureFlags> { }, row_vms);
|
||||
@@ -173,6 +173,19 @@ namespace mbts.spark {
|
||||
}
|
||||
}
|
||||
|
||||
static HashSet<string> _properties_for_csv_export = new HashSet<string>(new string[] {
|
||||
nameof(security),
|
||||
nameof(trade_key),
|
||||
nameof(time),
|
||||
nameof(price),
|
||||
nameof(size),
|
||||
nameof(aggressor_side),
|
||||
});
|
||||
public static IEnumerable<System.Reflection.PropertyInfo> csv_properties => typeof(Row).GetProperties()
|
||||
.Where(x => _properties_for_csv_export.Contains(x.Name)
|
||||
);
|
||||
|
||||
|
||||
public void raise_invalidated() => invalidated?.Invoke();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user