Skip to content

Commit

Permalink
Tweaks nullable context
Browse files Browse the repository at this point in the history
  • Loading branch information
akritikos committed Feb 13, 2021
1 parent a11ef4d commit f795654
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#nullable disable
#pragma warning disable SA1402 // File may only contain a single type
namespace Kritikos.Configuration.Persistence.Converters
{
Expand All @@ -17,7 +16,7 @@ namespace Kritikos.Configuration.Persistence.Converters
public class TimeSpanToNumberConverter<T> : ValueConverter<TimeSpan, T>
where T : unmanaged, IConvertible, IComparable, IComparable<T>, IEquatable<T>
{
public TimeSpanToNumberConverter(DateInterval interval, ConverterMappingHints mappingHints = null)
public TimeSpanToNumberConverter(DateInterval interval, ConverterMappingHints? mappingHints = null)
: base(
v => NumberFromTimeSpan(interval, v),
v => TimeSpanToNumber(interval, v),
Expand Down Expand Up @@ -94,7 +93,7 @@ private static TimeSpan TimeSpanToNumber(DateInterval interval, T val)
/// </summary>
public class TimeSpanToDoubleConverter : TimeSpanToNumberConverter<double>
{
public TimeSpanToDoubleConverter(DateInterval interval, ConverterMappingHints mappingHints = null)
public TimeSpanToDoubleConverter(DateInterval interval, ConverterMappingHints? mappingHints = null)
: base(interval, mappingHints)
{
}
Expand All @@ -105,7 +104,7 @@ public TimeSpanToDoubleConverter(DateInterval interval, ConverterMappingHints ma
/// </summary>
public class TimeSpanToLongConverter : TimeSpanToNumberConverter<long>
{
public TimeSpanToLongConverter(DateInterval interval, ConverterMappingHints mappingHints = null)
public TimeSpanToLongConverter(DateInterval interval, ConverterMappingHints? mappingHints = null)
: base(interval, mappingHints)
{
}
Expand All @@ -118,7 +117,7 @@ public TimeSpanToLongConverter(DateInterval interval, ConverterMappingHints mapp
/// <exception cref="OverflowException"><seealso cref="DateInterval"/> requested exceeds the max value of <see cref="int"/>.</exception>
public class TimeSpanToIntConverter : TimeSpanToNumberConverter<int>
{
public TimeSpanToIntConverter(DateInterval interval, ConverterMappingHints mappingHints = null)
public TimeSpanToIntConverter(DateInterval interval, ConverterMappingHints? mappingHints = null)
: base(interval, mappingHints)
{
}
Expand Down

0 comments on commit f795654

Please sign in to comment.