public DurationRange?GetDurationRange ([NotNull] SubstanceRoute route, [NotNull] SubstanceDoseLevel doseLevel) { return(!(_routes.TryGetValue( route, out var sri ) && sri.GetDurationRange(doseLevel) is DurationRange dr) ? default
/// <summary> /// Determines whether the <see cref="ISubstance"/> can be administered through the specified route. /// </summary> /// <param name="route">The route to check.</param> /// <returns><c>true</c> if the substance can be administered through the specified route; otherwise, <c>false</c>.</returns> public bool CanAdminister(SubstanceRoute route) { return(Routes.ContainsKey(route)); }
public SubstanceRouteInfo GetRoute([NotNull] SubstanceRoute route) { return(_routes.TryGetValue(route, out var r) ? r : null); }