remove unused implementations of SecurityGrid
This commit is contained in:
1 parent
0bee4168b4
commit
745be0909a
2 files changed
-38
No files matched your search
@@ -80,32 +80,6 @@ namespace mbts.spark
|
||||
}
|
||||
}
|
||||
|
||||
abstract class SecurityGrid<TRow, TRowModel, TCol> : SecurityGridBase<TRow, TRowModel>, IHandleCellSelection where TRow : class, ISecurityRow
|
||||
{
|
||||
protected SecurityGrid(IObservable<IEnumerable<TRowModel>> row_models, IEnumerable<SortingCriteria> sorting_criteria)
|
||||
: this(RXCollection.Create(row_models), sorting_criteria) { }
|
||||
|
||||
protected SecurityGrid(IObservable<IEnumerable<TRowModel>> row_models, IEqualityComparer<TRowModel> comparer, IEnumerable<SortingCriteria> sorting_criteria)
|
||||
: this(RXCollection.Create(row_models, comparer), sorting_criteria) { }
|
||||
|
||||
protected SecurityGrid(IRXCollection<TRowModel> row_models, IEnumerable<SortingCriteria> sorting_criteria) : base(row_models, sorting_criteria) =>
|
||||
_current_cell = backing<DataGridCellInfo>(nameof(current_cell));
|
||||
|
||||
readonly Property<DataGridCellInfo> _current_cell;
|
||||
IDictionary<TRow, HashSet<TCol>> _selection_map = new Dictionary<TRow, HashSet<TCol>>();
|
||||
|
||||
public DataGridCellInfo current_cell {
|
||||
get => _current_cell.Value;
|
||||
set { if (value.IsValid) _current_cell.Value = value; }
|
||||
}
|
||||
public override TRow current_row => _current_cell.Value.Item as TRow ?? selected_rows.FirstOrDefault();
|
||||
public override IObservable<TRow> current_row_observable => _current_cell.Select(v => v.newval.Item as TRow);
|
||||
public IDictionary<TRow, HashSet<TCol>> get_selection_map() => new Dictionary<TRow, HashSet<TCol>>(_selection_map);
|
||||
|
||||
void IHandleCellSelection.cell_selection_changed(IList<DataGridCellInfo> added, IList<DataGridCellInfo> removed) =>
|
||||
CellSelectionMapper.apply_changes(_selection_map, added, removed, selected_rows);
|
||||
}
|
||||
|
||||
static class SecurityGridExtensions
|
||||
{
|
||||
public static IObservable<SecurityMD?> current_security_md_observable<TRow, TRowModel>(this SecurityGridBase<TRow, TRowModel> security_grid, IBus bus)
|
||||
|
||||
@@ -21,16 +21,4 @@ namespace mbts.spark
|
||||
public IObservable<SecurityMD?> current_security_md =>
|
||||
current_row_observable.Select(r => r?.md).DistinctUntilChanged(EqualityComparer.CreateNullable<SecurityMD, uint>(md => md.security.Id));
|
||||
}
|
||||
|
||||
abstract class SecurityMDGrid<TRow, TRowModel, TCol> : SecurityGrid<TRow, TRowModel, TCol> where TRow : class, ISecurityMDRow
|
||||
{
|
||||
protected SecurityMDGrid(IObservable<IEnumerable<TRowModel>> row_models, IEnumerable<SortingCriteria> sorting_criteria)
|
||||
: base(row_models, sorting_criteria) { }
|
||||
|
||||
protected SecurityMDGrid(IObservable<IEnumerable<TRowModel>> row_models, IEqualityComparer<TRowModel> comparer, IEnumerable<SortingCriteria> sorting_criteria)
|
||||
: base(row_models, comparer, sorting_criteria) { }
|
||||
|
||||
public IObservable<SecurityMD?> current_security_md =>
|
||||
current_row_observable.Select(r => r?.md).DistinctUntilChanged(EqualityComparer.CreateNullable<SecurityMD, uint>(md => md.security.Id));
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user