private async void Calculate_Click(object sender, RoutedEventArgs e) { var baseGridReader = _readerFactory.GetFileReader(_model.BaseHorizonFileName); var topGridReader = _readerFactory.GetFileReader(_model.TopHorizonFileName); var calculator = VolumeCalculatorFactory.GetCalculator(); var unitConverter = UnitConverterFactory.GetConverter(_model.Unit); var logger = new TextBlockLogger(Results); Results.Inlines.Clear(); await calculator.CalculateAsync(baseGridReader, topGridReader, (NonNegativeDecimal)_model.GridWidth, (NonNegativeDecimal)_model.GridHeight, (NonNegativeDecimal)_model.FluidContact, unitConverter, logger); }
public Length(double val, Unit unit) : this(val, _converterFactory.GetConverter(unit)) { }