public static IStageVm ToStageVm ( this ISorterStage <ISwitchEval> sorterStage, int useMax, double switchWidth, double lineThickness, Brush lineBrush, Brush backgroundBrush, IReadOnlyList <Brush> switchBrushes ) { return(new StageVmImpl ( keyCount: sorterStage.KeyCount, keyPairVms: sorterStage.ToStageLayouts() .Select( sl => new KeyPairVm ( keyPair: sl.Item2, switchBrush: BrushFactory.LogBrushOfInt ( value: (int)sl.Item2.UseCount, max: useMax, brushList: switchBrushes ), position: sl.Item1 ) ).ToList(), switchWidth: switchWidth, lineThickness: lineThickness, lineBrush: lineBrush, backgroundBrush: backgroundBrush )); }
public static IStageVm ToStageVm ( this ISorterStage <IKeyPair> sorterStage, double switchWidth, double lineThickness, Brush lineBrush, Brush backgroundBrush, Brush switchBrush ) { return(new StageVmImpl ( keyCount: sorterStage.KeyCount, keyPairVms: sorterStage.ToStageLayouts() .Select( sl => new KeyPairVm ( keyPair: sl.Item2, switchBrush: switchBrush, position: sl.Item1 ) ).ToList(), switchWidth: switchWidth, lineThickness: lineThickness, lineBrush: lineBrush, backgroundBrush: backgroundBrush )); }