-
Notifications
You must be signed in to change notification settings - Fork 43
Nullable reference type #731
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,6 +3,7 @@ | |
|
|
||
| <PropertyGroup> | ||
| <TargetFrameworks>net8.0;net9.0</TargetFrameworks> | ||
| <Nullable>enable</Nullable> | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. None of our C# code bases and even .NET azure SDKs don't set Nullable to enable (the default value is disable). If we want to set it explicitly, it should be disable |
||
| <Description>Microsoft.Azure.AppConfiguration.AspNetCore allows developers to use Microsoft Azure App Configuration service as a configuration source in their applications. This package adds additional features for ASP.NET Core applications to the existing package Microsoft.Extensions.Configuration.AzureAppConfiguration.</Description> | ||
| <SignAssembly>true</SignAssembly> | ||
| <DelaySign>false</DelaySign> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,7 +10,7 @@ internal class CachedKeyVaultSecret | |
| ///// <summary> | ||
| ///// The value of the Key Vault secret. | ||
| ///// </summary> | ||
| public string SecretValue { get; set; } | ||
| public string? SecretValue { get; set; } | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Adding |
||
|
|
||
| /// <summary> | ||
| /// The time when this secret should be reloaded from Key Vault. | ||
|
|
@@ -30,9 +30,9 @@ internal class CachedKeyVaultSecret | |
| /// <summary> | ||
| /// The source <see cref="Uri"/> for this secret. | ||
| /// </summary> | ||
| public Uri SourceId { get; } | ||
| public Uri? SourceId { get; } | ||
|
|
||
| public CachedKeyVaultSecret(string secretValue = null, Uri sourceId = null, DateTimeOffset? refreshAt = null, int refreshAttempts = 0) | ||
| public CachedKeyVaultSecret(string? secretValue = null, Uri? sourceId = null, DateTimeOffset? refreshAt = null, int refreshAttempts = 0) | ||
| { | ||
| SecretValue = secretValue; | ||
| RefreshAt = refreshAt; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need to make
IConfigurationRefresherProvidernullable here. We have null check below, correct exception will be thrown