| 29 | } |
| 30 | |
| 31 | winrt::Windows::Foundation::IInspectable NumberToStringConverter::Convert( |
| 32 | winrt::Windows::Foundation::IInspectable const& value, |
| 33 | [[maybe_unused]] winrt::Windows::UI::Xaml::Interop::TypeName const& targetType, |
| 34 | [[maybe_unused]] winrt::Windows::Foundation::IInspectable const& parameter, |
| 35 | [[maybe_unused]] winrt::hstring const& language) |
| 36 | { |
| 37 | auto const byteValue = winrt::unbox_value<uint64_t>(value); |
| 38 | auto const [converted, unit] = ConvertUnit(byteValue); |
| 39 | return winrt::box_value(std::format(L"{:.2f} {}", converted, unit)); |
| 40 | } |
| 41 | |
| 42 | winrt::Windows::Foundation::IInspectable NumberToStringConverter::ConvertBack( |
| 43 | [[maybe_unused]] winrt::Windows::Foundation::IInspectable const& value, |
nothing calls this directly
no test coverage detected