public override void ResolveBreadUnitsForAddShortInsulin(AddShortInsulinIntent intent, Action <INDoubleResolutionResult> completion) { try { Console.WriteLine(intent.BreadUnits.DoubleValue); completion(INDoubleResolutionResult.GetSuccess(intent.BreadUnits.DoubleValue)); } catch (Exception e) { Console.WriteLine(e); } }
/// <inheritdoc /> public override void ResolveLevelForAddMeasure(AddMeasureIntent intent, Action <INDoubleResolutionResult> completion) { try { Console.WriteLine(intent.Level.DoubleValue); completion(intent.Level.DoubleValue <= Double.Epsilon ? INDoubleResolutionResult.NeedsValue : INDoubleResolutionResult.GetSuccess(intent.Level.DoubleValue)); } catch (Exception e) { Console.WriteLine(e); } }