Skip to content

Commit

Permalink
Add nullable annotation to Converting.From<T>(T? input).
Browse files Browse the repository at this point in the history
  • Loading branch information
Corniel Nobel committed May 3, 2023
1 parent 61102c6 commit 92b3085
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Qowaiv.TestTools/Converting.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ public static class Converting
{
/// <summary>Initializes a new instance of the <see cref="ConvertFrom{From}"/> class.</summary>
[Pure]
public static ConvertFrom<TFrom> From<TFrom>(TFrom subject) => new(subject);
public static ConvertFrom<TFrom> From<TFrom>(TFrom? subject) => new(subject);

/// <summary>Initializes a new instance of the <see cref="ConvertTo{To}"/> class.</summary>
[Pure]
Expand All @@ -19,10 +19,10 @@ public static class Converting
/// <summary>Type converter builder to apply <see cref="TypeConverter.ConvertFrom(object)"/>.</summary>
public sealed class ConvertFrom<TFrom>
{
internal ConvertFrom(TFrom subject) => Subject = subject;
internal ConvertFrom(TFrom? subject) => Subject = subject;

/// <summary>The subject that can be converted to a destination type.</summary>
public TFrom Subject { get; }
public TFrom? Subject { get; }

/// <summary>Converts the value to the destination type, using its <see cref="TypeConverter"/>.</summary>
[Pure]
Expand Down

0 comments on commit 92b3085

Please sign in to comment.