/// <summary> /// Returns a <see cref="CallSettings"/> which will have the specified timeout. /// </summary> /// <param name="settings">Existing settings. May be null, meaning there are currently no settings.</param> /// <param name="timeout">The timeout for the new settings.</param> /// <returns>A new <see cref="CallSettings"/> with the given timeout.</returns> public static CallSettings WithTimeout(this CallSettings settings, TimeSpan timeout) => settings.WithExpiration(Expiration.FromTimeout(timeout));
/// <summary> /// Returns a <see cref="CallSettings"/> which will have the specified deadline. /// </summary> /// <param name="settings">Existing settings. May be null, meaning there are currently no settings.</param> /// <param name="deadline">The deadline for the new settings.</param> /// <returns>A new <see cref="CallSettings"/> with the given deadline.</returns> public static CallSettings WithDeadline(this CallSettings settings, DateTime deadline) => settings.WithExpiration(Expiration.FromDeadline(deadline));