-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable Nullable Reference Types feature #22
Comments
Hi, I'd like to dig into this issue. Could you give me a bit of guidance and possibly assign this to me? |
My advice for this one would be to
e.g. If we look at the public class Info
{
public Info(string title, string version)
{
Title = title ?? throw new ArgumentNullException(nameof(title));
Version = version ?? throw new ArgumentNullException(nameof(version));
}
[JsonPropertyName("title")]
public string Title { get; }
[JsonPropertyName("version")]
public string Version { get; }
[JsonPropertyName("description")]
public string? Description { get; set; }
[JsonPropertyName("termsOfService")]
public string? TermsOfService { get; set; }
[JsonPropertyName("contact")]
public Contact? Contact { get; set; }
[JsonPropertyName("license")]
public License? License { get; set; }
} |
Hi @domca25101 , are you still working on this one? I would be interested as well |
Hi @dgnaegi, yes I am working on it. |
Hi, I have encountered a couple issues that I need a bit of help with:
|
For (2), I would add the check. For (1), I will review the code when I am back from holiday and reply. |
Closing as not needed for now. |
We should use the C# 8.0 feature Nullable Reference Types to prevent Null Reference Exceptions.
https://docs.microsoft.com/en-us/dotnet/csharp/nullable-references
The text was updated successfully, but these errors were encountered: