mirror of
https://github.com/bitwarden/server
synced 2025-12-23 03:33:35 +00:00
Add #nullable disable to platform code (#6057)
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
using System.Net;
|
||||
// FIXME: Update this file to be null safe and then delete the line below
|
||||
#nullable disable
|
||||
|
||||
using System.Net;
|
||||
using System.Net.Http.Headers;
|
||||
using System.Net.Http.Json;
|
||||
using System.Text.Json;
|
||||
|
||||
@@ -20,17 +20,19 @@ public class I18nService : II18nService
|
||||
return _localizer[key];
|
||||
}
|
||||
|
||||
public LocalizedString GetLocalizedHtmlString(string key, params object[] args)
|
||||
public LocalizedString GetLocalizedHtmlString(string key, params object?[] args)
|
||||
{
|
||||
#nullable disable // IStringLocalizer does actually support null args, it is annotated incorrectly: https://github.com/dotnet/aspnetcore/issues/44251
|
||||
return _localizer[key, args];
|
||||
#nullable enable
|
||||
}
|
||||
|
||||
public string Translate(string key, params object[] args)
|
||||
public string Translate(string key, params object?[] args)
|
||||
{
|
||||
return string.Format(GetLocalizedHtmlString(key).ToString(), args);
|
||||
}
|
||||
|
||||
public string T(string key, params object[] args)
|
||||
public string T(string key, params object?[] args)
|
||||
{
|
||||
return Translate(key, args);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
using Bit.Core.AdminConsole.Entities;
|
||||
// FIXME: Update this file to be null safe and then delete the line below
|
||||
#nullable disable
|
||||
|
||||
using Bit.Core.AdminConsole.Entities;
|
||||
using Bit.Core.AdminConsole.Entities.Provider;
|
||||
using Bit.Core.AdminConsole.Models.Data.Provider;
|
||||
using Bit.Core.AdminConsole.Repositories;
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
using Bit.Core.Context;
|
||||
// FIXME: Update this file to be null safe and then delete the line below
|
||||
#nullable disable
|
||||
|
||||
using Bit.Core.Context;
|
||||
using Bit.Core.Identity;
|
||||
using Bit.Core.Settings;
|
||||
using Bit.Core.Utilities;
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
using System.IdentityModel.Tokens.Jwt;
|
||||
// FIXME: Update this file to be null safe and then delete the line below
|
||||
#nullable disable
|
||||
|
||||
using System.IdentityModel.Tokens.Jwt;
|
||||
using System.Security.Claims;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using System.Text;
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
// FIXME: Update this file to be null safe and then delete the line below
|
||||
#nullable disable
|
||||
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using Bit.Core.Platform.X509ChainCustomization;
|
||||
using Bit.Core.Settings;
|
||||
using Bit.Core.Utilities;
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
using Bit.Core.Models.BitStripe;
|
||||
// FIXME: Update this file to be null safe and then delete the line below
|
||||
#nullable disable
|
||||
|
||||
using Bit.Core.Models.BitStripe;
|
||||
using Stripe;
|
||||
|
||||
namespace Bit.Core.Services;
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
using Bit.Core.AdminConsole.Entities;
|
||||
// FIXME: Update this file to be null safe and then delete the line below
|
||||
#nullable disable
|
||||
|
||||
using Bit.Core.AdminConsole.Entities;
|
||||
using Bit.Core.AdminConsole.Entities.Provider;
|
||||
using Bit.Core.AdminConsole.Models.Business;
|
||||
using Bit.Core.Billing.Constants;
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
using System.Security.Claims;
|
||||
// FIXME: Update this file to be null safe and then delete the line below
|
||||
#nullable disable
|
||||
|
||||
using System.Security.Claims;
|
||||
using Bit.Core.AdminConsole.Entities;
|
||||
using Bit.Core.AdminConsole.Enums;
|
||||
using Bit.Core.AdminConsole.Models.Data;
|
||||
|
||||
Reference in New Issue
Block a user