Browse Source

Merge branch 'connection-status-feature' of https://github.com/abpframework/abp into connection-status-feature

pull/17027/head
Sinan997 3 years ago
parent
commit
9e3a953b0f
  1. 23
      docs/en/Module-Development-Basics.md
  2. 2
      framework/src/Volo.Abp.ApiVersioning.Abstractions/Volo.Abp.ApiVersioning.Abstractions.csproj
  3. 2
      framework/src/Volo.Abp.ApiVersioning.Abstractions/Volo/Abp/ApiVersioning/IRequestedApiVersion.cs
  4. 2
      framework/src/Volo.Abp.ApiVersioning.Abstractions/Volo/Abp/ApiVersioning/NullRequestedApiVersion.cs
  5. 2
      framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AbpAspNetCoreMvcModule.cs
  6. 4
      framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApplicationPartSorter.cs
  7. 18
      framework/src/Volo.Abp.AspNetCore.TestBase/Volo/Abp/AspNetCore/TestBase/AbpAspNetCoreIntegratedTestBase.cs
  8. 18
      framework/src/Volo.Abp.AspNetCore.TestBase/Volo/Abp/AspNetCore/TestBase/TestStartup.cs
  9. 2
      framework/src/Volo.Abp.Autofac.WebAssembly/Microsoft/AspNetCore/Components/WebAssembly/Hosting/AbpWebAssemblyApplicationCreationOptionsAutofacExtensions.cs
  10. 2
      framework/src/Volo.Abp.Autofac.WebAssembly/Volo.Abp.Autofac.WebAssembly.csproj
  11. 2
      framework/src/Volo.Abp.Autofac/Autofac/Builder/AbpRegistrationBuilderExtensions.cs
  12. 8
      framework/src/Volo.Abp.Autofac/Autofac/Extensions/DependencyInjection/AutofacRegistration.cs
  13. 2
      framework/src/Volo.Abp.Autofac/Microsoft/Extensions/DependencyInjection/AbpAutofacServiceCollectionExtensions.cs
  14. 2
      framework/src/Volo.Abp.Autofac/Volo.Abp.Autofac.csproj
  15. 2
      framework/src/Volo.Abp.Autofac/Volo/Abp/Autofac/AbpAutofacServiceProviderFactory.cs
  16. 2
      framework/src/Volo.Abp.Castle.Core/Volo.Abp.Castle.Core.csproj
  17. 4
      framework/src/Volo.Abp.Castle.Core/Volo/Abp/Castle/DynamicProxy/CastleAbpMethodInvocationAdapterBase.cs
  18. 2
      framework/src/Volo.Abp.Castle.Core/Volo/Abp/Castle/DynamicProxy/CastleAbpMethodInvocationAdapterWithReturnValue.cs
  19. 20
      framework/src/Volo.Abp.Core/Volo/Abp/AbpApplicationBase.cs
  20. 4
      framework/src/Volo.Abp.Core/Volo/Abp/AbpException.cs
  21. 4
      framework/src/Volo.Abp.Core/Volo/Abp/Modularity/AbpModuleDescriptor.cs
  22. 21
      framework/src/Volo.Abp.Core/Volo/Abp/Modularity/AbpModuleHelper.cs
  23. 24
      framework/src/Volo.Abp.Core/Volo/Abp/Modularity/AdditionalAssemblyAttribute.cs
  24. 4
      framework/src/Volo.Abp.Core/Volo/Abp/Modularity/DependsOnAttribute.cs
  25. 23
      framework/src/Volo.Abp.Core/Volo/Abp/Modularity/IAbpModuleDescriptor.cs
  26. 8
      framework/src/Volo.Abp.Core/Volo/Abp/Modularity/IAdditionalModuleAssemblyProvider.cs
  27. 2
      framework/src/Volo.Abp.Core/Volo/Abp/Reflection/AssemblyFinder.cs
  28. 2
      framework/src/Volo.Abp.Data/Volo.Abp.Data.csproj
  29. 2
      framework/src/Volo.Abp.Data/Volo/Abp/Data/AbpCommonDbProperties.cs
  30. 8
      framework/src/Volo.Abp.Data/Volo/Abp/Data/AbpDataMigrationEnvironmentExtensions.cs
  31. 3
      framework/src/Volo.Abp.Data/Volo/Abp/Data/AbpDatabaseInfoDictionary.cs
  32. 2
      framework/src/Volo.Abp.Data/Volo/Abp/Data/AbpDbConnectionOptions.cs
  33. 2
      framework/src/Volo.Abp.Data/Volo/Abp/Data/AppliedDatabaseMigrationsEto.cs
  34. 2
      framework/src/Volo.Abp.Data/Volo/Abp/Data/ApplyDatabaseMigrationsEto.cs
  35. 4
      framework/src/Volo.Abp.Data/Volo/Abp/Data/ConcurrencyStampExtensions.cs
  36. 2
      framework/src/Volo.Abp.Data/Volo/Abp/Data/ConnectionStringNameAttribute.cs
  37. 4
      framework/src/Volo.Abp.Data/Volo/Abp/Data/ConnectionStrings.cs
  38. 12
      framework/src/Volo.Abp.Data/Volo/Abp/Data/DataFilter.cs
  39. 9
      framework/src/Volo.Abp.Data/Volo/Abp/Data/DataSeedContext.cs
  40. 4
      framework/src/Volo.Abp.Data/Volo/Abp/Data/DataSeeder.cs
  41. 2
      framework/src/Volo.Abp.Data/Volo/Abp/Data/DataSeederExtensions.cs
  42. 10
      framework/src/Volo.Abp.Data/Volo/Abp/Data/DefaultConnectionStringResolver.cs
  43. 4
      framework/src/Volo.Abp.Data/Volo/Abp/Data/IConnectionStringResolver.cs
  44. 2
      framework/src/Volo.Abp.ExceptionHandling/Volo.Abp.ExceptionHandling.csproj
  45. 24
      framework/src/Volo.Abp.ExceptionHandling/Volo/Abp/AspNetCore/ExceptionHandling/DefaultExceptionToErrorInfoConverter.cs
  46. 2
      framework/src/Volo.Abp.ExceptionHandling/Volo/Abp/AspNetCore/ExceptionHandling/IExceptionToErrorInfoConverter.cs
  47. 8
      framework/src/Volo.Abp.ExceptionHandling/Volo/Abp/Domain/Entities/EntityNotFoundException.cs
  48. 10
      framework/src/Volo.Abp.ExceptionHandling/Volo/Abp/Http/Client/AbpRemoteCallException.cs
  49. 12
      framework/src/Volo.Abp.ExceptionHandling/Volo/Abp/Http/RemoteServiceErrorInfo.cs
  50. 4
      framework/src/Volo.Abp.ExceptionHandling/Volo/Abp/Http/RemoteServiceValidationErrorInfo.cs
  51. 2
      framework/src/Volo.Abp.Guids/Volo.Abp.Guids.csproj
  52. 2
      framework/src/Volo.Abp.Http.Client.Web/Volo/Abp/Http/Client/Web/AbpHttpClientWebModule.cs
  53. 2
      framework/src/Volo.Abp.Json.Abstractions/Volo.Abp.Json.Abstractions.csproj
  54. 2
      framework/src/Volo.Abp.Json.Abstractions/Volo/Abp/Json/AbpJsonOptions.cs
  55. 2
      framework/src/Volo.Abp.Json.Newtonsoft/Volo.Abp.Json.Newtonsoft.csproj
  56. 10
      framework/src/Volo.Abp.Json.Newtonsoft/Volo/Abp/Json/Newtonsoft/AbpDateTimeConverter.cs
  57. 4
      framework/src/Volo.Abp.Json.Newtonsoft/Volo/Abp/Json/Newtonsoft/AbpNewtonsoftJsonSerializer.cs
  58. 2
      framework/src/Volo.Abp.Json.SystemTextJson/Volo.Abp.Json.SystemTextJson.csproj
  59. 4
      framework/src/Volo.Abp.Json.SystemTextJson/Volo/Abp/Json/SystemTextJson/AbpSystemTextJsonSerializer.cs
  60. 2
      framework/src/Volo.Abp.Json.SystemTextJson/Volo/Abp/Json/SystemTextJson/JsonConverters/AbpNullableStringToGuidConverter.cs
  61. 2
      framework/src/Volo.Abp.Json.SystemTextJson/Volo/Abp/Json/SystemTextJson/JsonConverters/AbpStringToBooleanConverter.cs
  62. 10
      framework/src/Volo.Abp.Json.SystemTextJson/Volo/Abp/Json/SystemTextJson/JsonConverters/AbpStringToEnumConverter.cs
  63. 6
      framework/src/Volo.Abp.Json.SystemTextJson/Volo/Abp/Json/SystemTextJson/JsonConverters/AbpStringToEnumFactory.cs
  64. 2
      framework/src/Volo.Abp.Json.SystemTextJson/Volo/Abp/Json/SystemTextJson/JsonConverters/AbpStringToGuidConverter.cs
  65. 20
      framework/src/Volo.Abp.Json.SystemTextJson/Volo/Abp/Json/SystemTextJson/JsonConverters/ObjectToInferredTypesConverter.cs
  66. 2
      framework/src/Volo.Abp.Json.SystemTextJson/Volo/Abp/Json/SystemTextJson/Modifiers/AbpDateTimeConverterModifier.cs
  67. 2
      framework/src/Volo.Abp.Json.SystemTextJson/Volo/Abp/Json/SystemTextJson/Modifiers/AbpIgnorePropertiesModifiers.cs
  68. 2
      framework/src/Volo.Abp.Json.SystemTextJson/Volo/Abp/Json/SystemTextJson/Modifiers/AbpIncludeExtraPropertiesModifiers.cs
  69. 2
      framework/src/Volo.Abp.Json.SystemTextJson/Volo/Abp/Json/SystemTextJson/Modifiers/AbpIncludeNonPublicPropertiesModifiers.cs
  70. 2
      framework/src/Volo.Abp.Ldap.Abstractions/Volo.Abp.Ldap.Abstractions.csproj
  71. 10
      framework/src/Volo.Abp.Ldap.Abstractions/Volo/Abp/Ldap/ILdapSettingProvider.cs
  72. 2
      framework/src/Volo.Abp.Ldap/Volo.Abp.Ldap.csproj
  73. 10
      framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/LdapSettingProvider.cs
  74. 9
      framework/src/Volo.Abp.Localization.Abstractions/Microsoft/Extensions/Localization/AbpStringLocalizerFactoryExtensions.cs
  75. 9
      framework/src/Volo.Abp.Localization.Abstractions/Microsoft/Extensions/Localization/IAbpStringLocalizerFactory.cs
  76. 2
      framework/src/Volo.Abp.Localization.Abstractions/Volo.Abp.Localization.Abstractions.csproj
  77. 2
      framework/src/Volo.Abp.Localization.Abstractions/Volo/Abp/Localization/HasNameWithLocalizableDisplayNameExtensions.cs
  78. 3
      framework/src/Volo.Abp.Localization.Abstractions/Volo/Abp/Localization/IHasNameWithLocalizableDisplayName.cs
  79. 16
      framework/src/Volo.Abp.Localization.Abstractions/Volo/Abp/Localization/LocalizableString.cs
  80. 4
      framework/src/Volo.Abp.Localization.Abstractions/Volo/Abp/Localization/LocalizationResourceNameAttribute.cs
  81. 2
      framework/src/Volo.Abp.Localization/Volo.Abp.Localization.csproj
  82. 8
      framework/src/Volo.Abp.Localization/Volo/Abp/Localization/AbpDictionaryBasedStringLocalizer.cs
  83. 8
      framework/src/Volo.Abp.Localization/Volo/Abp/Localization/AbpEnumLocalizer.cs
  84. 2
      framework/src/Volo.Abp.Localization/Volo/Abp/Localization/AbpLocalizationOptions.cs
  85. 2
      framework/src/Volo.Abp.Localization/Volo/Abp/Localization/AbpStringLocalizerExtensions.cs
  86. 16
      framework/src/Volo.Abp.Localization/Volo/Abp/Localization/AbpStringLocalizerFactory.cs
  87. 6
      framework/src/Volo.Abp.Localization/Volo/Abp/Localization/External/IExternalLocalizationStore.cs
  88. 6
      framework/src/Volo.Abp.Localization/Volo/Abp/Localization/External/NullExternalLocalizationStore.cs
  89. 2
      framework/src/Volo.Abp.Localization/Volo/Abp/Localization/ILanguageInfo.cs
  90. 2
      framework/src/Volo.Abp.Localization/Volo/Abp/Localization/ILocalizableStringSerializer.cs
  91. 2
      framework/src/Volo.Abp.Localization/Volo/Abp/Localization/ILocalizationDictionary.cs
  92. 2
      framework/src/Volo.Abp.Localization/Volo/Abp/Localization/ILocalizationResourceContributor.cs
  93. 14
      framework/src/Volo.Abp.Localization/Volo/Abp/Localization/Json/JsonLocalizationDictionaryBuilder.cs
  94. 2
      framework/src/Volo.Abp.Localization/Volo/Abp/Localization/Json/JsonLocalizationFile.cs
  95. 29
      framework/src/Volo.Abp.Localization/Volo/Abp/Localization/LanguageInfo.cs
  96. 4
      framework/src/Volo.Abp.Localization/Volo/Abp/Localization/LanguageInfoExtensions.cs
  97. 2
      framework/src/Volo.Abp.Localization/Volo/Abp/Localization/LocalizableStringSerializer.cs
  98. 4
      framework/src/Volo.Abp.Localization/Volo/Abp/Localization/LocalizationResource.cs
  99. 7
      framework/src/Volo.Abp.Localization/Volo/Abp/Localization/LocalizationResourceBase.cs
  100. 2
      framework/src/Volo.Abp.Localization/Volo/Abp/Localization/LocalizationResourceContributorList.cs

23
docs/en/Module-Development-Basics.md

@ -147,7 +147,7 @@ Lastly, you can override ``OnApplicationShutdown`` method if you want to execute
## Module Dependencies ## Module Dependencies
In a modular application, it's not unusual for one module to depend upon another module(s). An Abp module must declare ``[DependsOn]`` attribute if it does have a dependency upon another module, as shown below: In a modular application, it's not unusual for one module to depend upon another module(s). An ABP module must declare a ``[DependsOn]`` attribute if it does have a dependency upon another module, as shown below:
````C# ````C#
[DependsOn(typeof(AbpAspNetCoreMvcModule))] [DependsOn(typeof(AbpAspNetCoreMvcModule))]
@ -162,6 +162,27 @@ You can use multiple ``DependsOn`` attribute or pass multiple module types to a
A depended module may depend on another module, but you only need to define your direct dependencies. ABP investigates the dependency graph for the application at startup and initializes/shutdowns modules in the correct order. A depended module may depend on another module, but you only need to define your direct dependencies. ABP investigates the dependency graph for the application at startup and initializes/shutdowns modules in the correct order.
## Additional Module Assemblies
ABP automatically registers all the services of your module to the [dependency injection](Dependency-Injection.md) system. It finds the service types by scanning types in the assembly that defines your module class. That assembly is considered as the main assembly of your module.
Typically, every assembly contains a separate module class definition. Then modules depend on each other using the `DependsOn` attribute as explained in the previous section. However, in some rare cases, your module may consist of multiple assemblies, and only one of them defines a module class, and you want to make the other assemblies parts of your module. In that case, you can use the `AdditionalAssembly` attribute as shown below:
````csharp
[DependsOn(...)] // Your module dependencies as you normally do
[AdditionalAssembly(typeof(BlogService))] // A type in the target assembly
public class BlogModule
{
//...
}
````
In this example, we assume that the `BlogService` class is inside one assembly (`csproj`) and the `BlogModule` class is inside another assembly (`csproj`). With the `AdditionalAssembly` definition, ABP will load the assembly containing the `BlogService` class as a part of the blog module.
Notice that `BlogService` is only an arbitrary selected type in the target assembly. It is just used to indicate the related assembly. You could use any type in the assembly.
> WARNING: If you need to use the `AdditionalAssembly`, be sure that you don't design your system in a wrong way. With this example above, the `BlogService` class' assembly should normally have its own module class and the `BlogModule` should depend on it using the `DependsOn` attribute. Do not use the `AdditionalAssembly` attribute when you can already use the `DependsOn` attribute.
## Framework Modules vs Application Modules ## Framework Modules vs Application Modules
There are **two types of modules.** They don't have any structural difference but categorized by functionality and purpose: There are **two types of modules.** They don't have any structural difference but categorized by functionality and purpose:

2
framework/src/Volo.Abp.ApiVersioning.Abstractions/Volo.Abp.ApiVersioning.Abstractions.csproj

@ -5,6 +5,8 @@
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>netstandard2.0;netstandard2.1;net7.0</TargetFrameworks> <TargetFrameworks>netstandard2.0;netstandard2.1;net7.0</TargetFrameworks>
<Nullable>enable</Nullable>
<WarningsAsErrors>Nullable</WarningsAsErrors>
<AssemblyName>Volo.Abp.ApiVersioning.Abstractions</AssemblyName> <AssemblyName>Volo.Abp.ApiVersioning.Abstractions</AssemblyName>
<PackageId>Volo.Abp.ApiVersioning.Abstractions</PackageId> <PackageId>Volo.Abp.ApiVersioning.Abstractions</PackageId>
<AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback> <AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback>

2
framework/src/Volo.Abp.ApiVersioning.Abstractions/Volo/Abp/ApiVersioning/IRequestedApiVersion.cs

@ -2,5 +2,5 @@
public interface IRequestedApiVersion public interface IRequestedApiVersion
{ {
string Current { get; } string? Current { get; }
} }

2
framework/src/Volo.Abp.ApiVersioning.Abstractions/Volo/Abp/ApiVersioning/NullRequestedApiVersion.cs

@ -4,7 +4,7 @@ public class NullRequestedApiVersion : IRequestedApiVersion
{ {
public static NullRequestedApiVersion Instance = new NullRequestedApiVersion(); public static NullRequestedApiVersion Instance = new NullRequestedApiVersion();
public string Current => null; public string? Current => null;
private NullRequestedApiVersion() private NullRequestedApiVersion()
{ {

2
framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AbpAspNetCoreMvcModule.cs

@ -233,7 +233,7 @@ public class AbpAspNetCoreMvcModule : AbpModule
.GetRequiredService<IModuleContainer>() .GetRequiredService<IModuleContainer>()
.Modules .Modules
.Where(m => m.IsLoadedAsPlugIn) .Where(m => m.IsLoadedAsPlugIn)
.Select(m => m.Type.Assembly) .SelectMany(m => m.AllAssemblies)
.Distinct(); .Distinct();
AddToApplicationParts(partManager, moduleAssemblies); AddToApplicationParts(partManager, moduleAssemblies);

4
framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApplicationPartSorter.cs

@ -125,7 +125,7 @@ public static class ApplicationPartSorter
var moduleDependedAssemblies = moduleDescriptor var moduleDependedAssemblies = moduleDescriptor
.Dependencies .Dependencies
.Select(d => d.Assembly) .SelectMany(d => d.AllAssemblies)
.ToArray(); .ToArray();
return partManager.ApplicationParts return partManager.ApplicationParts
@ -161,6 +161,6 @@ public static class ApplicationPartSorter
{ {
return moduleContainer return moduleContainer
.Modules .Modules
.FirstOrDefault(m => m.Assembly == assembly); .FirstOrDefault(m => m.AllAssemblies.Contains(assembly));
} }
} }

18
framework/src/Volo.Abp.AspNetCore.TestBase/Volo/Abp/AspNetCore/TestBase/AbpAspNetCoreIntegratedTestBase.cs

@ -7,11 +7,15 @@ using Microsoft.AspNetCore.Routing;
using Microsoft.AspNetCore.TestHost; using Microsoft.AspNetCore.TestHost;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Hosting;
using Volo.Abp.Modularity;
namespace Volo.Abp.AspNetCore.TestBase; namespace Volo.Abp.AspNetCore.TestBase;
public abstract class AbpAspNetCoreIntegratedTestBase<TStartup> : AbpTestBaseWithServiceProvider, IDisposable /// <typeparam name="TStartupModule">
where TStartup : class /// Can be a module type or old-style ASP.NET Core Startup class.
/// </typeparam>
public abstract class AbpAspNetCoreIntegratedTestBase<TStartupModule> : AbpTestBaseWithServiceProvider, IDisposable
where TStartupModule : class
{ {
protected TestServer Server { get; } protected TestServer Server { get; }
@ -39,7 +43,15 @@ public abstract class AbpAspNetCoreIntegratedTestBase<TStartup> : AbpTestBaseWit
return Host.CreateDefaultBuilder() return Host.CreateDefaultBuilder()
.ConfigureWebHostDefaults(webBuilder => .ConfigureWebHostDefaults(webBuilder =>
{ {
webBuilder.UseStartup<TStartup>(); if (typeof(TStartupModule).IsAssignableTo<IAbpModule>())
{
webBuilder.UseStartup<TestStartup<TStartupModule>>();
}
else
{
webBuilder.UseStartup<TStartupModule>();
}
webBuilder.UseAbpTestServer(); webBuilder.UseAbpTestServer();
}) })
.UseAutofac() .UseAutofac()

18
framework/src/Volo.Abp.AspNetCore.TestBase/Volo/Abp/AspNetCore/TestBase/TestStartup.cs

@ -0,0 +1,18 @@
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Threading;
namespace Volo.Abp.AspNetCore.TestBase;
internal class TestStartup<TStartupModule>
{
public void ConfigureServices(IServiceCollection services)
{
AsyncHelper.RunSync(() => services.AddApplicationAsync(typeof(TStartupModule)));
}
public void Configure(IApplicationBuilder app)
{
AsyncHelper.RunSync(app.InitializeApplicationAsync);
}
}

2
framework/src/Volo.Abp.Autofac.WebAssembly/Microsoft/AspNetCore/Components/WebAssembly/Hosting/AbpWebAssemblyApplicationCreationOptionsAutofacExtensions.cs

@ -11,7 +11,7 @@ public static class AbpWebAssemblyApplicationCreationOptionsAutofacExtensions
{ {
public static void UseAutofac( public static void UseAutofac(
[NotNull] this AbpWebAssemblyApplicationCreationOptions options, [NotNull] this AbpWebAssemblyApplicationCreationOptions options,
[CanBeNull] Action<ContainerBuilder> configure = null) Action<ContainerBuilder>? configure = null)
{ {
options.HostBuilder.Services.AddAutofacServiceProviderFactory(); options.HostBuilder.Services.AddAutofacServiceProviderFactory();
options.HostBuilder.ConfigureContainer( options.HostBuilder.ConfigureContainer(

2
framework/src/Volo.Abp.Autofac.WebAssembly/Volo.Abp.Autofac.WebAssembly.csproj

@ -5,6 +5,8 @@
<PropertyGroup> <PropertyGroup>
<TargetFramework>net7.0</TargetFramework> <TargetFramework>net7.0</TargetFramework>
<Nullable>enable</Nullable>
<WarningsAsErrors>Nullable</WarningsAsErrors>
<RootNamespace /> <RootNamespace />
</PropertyGroup> </PropertyGroup>

2
framework/src/Volo.Abp.Autofac/Autofac/Builder/AbpRegistrationBuilderExtensions.cs

@ -69,7 +69,7 @@ public static class AbpRegistrationBuilderExtensions
where TActivatorData : ReflectionActivatorData where TActivatorData : ReflectionActivatorData
{ {
// Enable Property Injection only for types in an assembly containing an AbpModule and without a DisablePropertyInjection attribute on class or properties. // Enable Property Injection only for types in an assembly containing an AbpModule and without a DisablePropertyInjection attribute on class or properties.
if (moduleContainer.Modules.Any(m => m.Assembly == implementationType.Assembly) && if (moduleContainer.Modules.Any(m => m.AllAssemblies.Contains(implementationType.Assembly)) &&
implementationType.GetCustomAttributes(typeof(DisablePropertyInjectionAttribute), true).IsNullOrEmpty()) implementationType.GetCustomAttributes(typeof(DisablePropertyInjectionAttribute), true).IsNullOrEmpty())
{ {
registrationBuilder = registrationBuilder.PropertiesAutowired(new AbpPropertySelector(false)); registrationBuilder = registrationBuilder.PropertiesAutowired(new AbpPropertySelector(false));

8
framework/src/Volo.Abp.Autofac/Autofac/Extensions/DependencyInjection/AutofacRegistration.cs

@ -87,7 +87,7 @@ public static class AutofacRegistration
public static void Populate( public static void Populate(
this ContainerBuilder builder, this ContainerBuilder builder,
IServiceCollection services, IServiceCollection services,
object lifetimeScopeTagForSingletons) object? lifetimeScopeTagForSingletons)
{ {
if (services == null) if (services == null)
{ {
@ -134,7 +134,7 @@ public static class AutofacRegistration
private static IRegistrationBuilder<object, TActivatorData, TRegistrationStyle> ConfigureLifecycle<TActivatorData, TRegistrationStyle>( private static IRegistrationBuilder<object, TActivatorData, TRegistrationStyle> ConfigureLifecycle<TActivatorData, TRegistrationStyle>(
this IRegistrationBuilder<object, TActivatorData, TRegistrationStyle> registrationBuilder, this IRegistrationBuilder<object, TActivatorData, TRegistrationStyle> registrationBuilder,
ServiceLifetime lifecycleKind, ServiceLifetime lifecycleKind,
object lifetimeScopeTagForSingleton) object? lifetimeScopeTagForSingleton)
{ {
switch (lifecycleKind) switch (lifecycleKind)
{ {
@ -179,7 +179,7 @@ public static class AutofacRegistration
private static void Register( private static void Register(
ContainerBuilder builder, ContainerBuilder builder,
IServiceCollection services, IServiceCollection services,
object lifetimeScopeTagForSingletons) object? lifetimeScopeTagForSingletons)
{ {
var moduleContainer = services.GetSingletonInstance<IModuleContainer>(); var moduleContainer = services.GetSingletonInstance<IModuleContainer>();
var registrationActionList = services.GetRegistrationActionList(); var registrationActionList = services.GetRegistrationActionList();
@ -223,7 +223,7 @@ public static class AutofacRegistration
else else
{ {
builder builder
.RegisterInstance(descriptor.ImplementationInstance) .RegisterInstance(descriptor.ImplementationInstance!)
.As(descriptor.ServiceType) .As(descriptor.ServiceType)
.ConfigureLifecycle(descriptor.Lifetime, null); .ConfigureLifecycle(descriptor.Lifetime, null);
} }

2
framework/src/Volo.Abp.Autofac/Microsoft/Extensions/DependencyInjection/AbpAutofacServiceCollectionExtensions.cs

@ -21,7 +21,7 @@ public static class AbpAutofacServiceCollectionExtensions
return builder; return builder;
} }
public static IServiceProvider BuildAutofacServiceProvider([NotNull] this IServiceCollection services, Action<ContainerBuilder> builderAction = null) public static IServiceProvider BuildAutofacServiceProvider([NotNull] this IServiceCollection services, Action<ContainerBuilder>? builderAction = null)
{ {
return services.BuildServiceProviderFromFactory(builderAction); return services.BuildServiceProviderFromFactory(builderAction);
} }

2
framework/src/Volo.Abp.Autofac/Volo.Abp.Autofac.csproj

@ -5,6 +5,8 @@
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>netstandard2.0;netstandard2.1;net7.0</TargetFrameworks> <TargetFrameworks>netstandard2.0;netstandard2.1;net7.0</TargetFrameworks>
<Nullable>enable</Nullable>
<WarningsAsErrors>Nullable</WarningsAsErrors>
<AssemblyName>Volo.Abp.Autofac</AssemblyName> <AssemblyName>Volo.Abp.Autofac</AssemblyName>
<PackageId>Volo.Abp.Autofac</PackageId> <PackageId>Volo.Abp.Autofac</PackageId>
<AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback> <AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback>

2
framework/src/Volo.Abp.Autofac/Volo/Abp/Autofac/AbpAutofacServiceProviderFactory.cs

@ -11,7 +11,7 @@ namespace Volo.Abp.Autofac;
public class AbpAutofacServiceProviderFactory : IServiceProviderFactory<ContainerBuilder> public class AbpAutofacServiceProviderFactory : IServiceProviderFactory<ContainerBuilder>
{ {
private readonly ContainerBuilder _builder; private readonly ContainerBuilder _builder;
private IServiceCollection _services; private IServiceCollection _services = default!;
public AbpAutofacServiceProviderFactory(ContainerBuilder builder) public AbpAutofacServiceProviderFactory(ContainerBuilder builder)
{ {

2
framework/src/Volo.Abp.Castle.Core/Volo.Abp.Castle.Core.csproj

@ -5,6 +5,8 @@
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>netstandard2.0;netstandard2.1;net7.0</TargetFrameworks> <TargetFrameworks>netstandard2.0;netstandard2.1;net7.0</TargetFrameworks>
<Nullable>enable</Nullable>
<WarningsAsErrors>Nullable</WarningsAsErrors>
<AssemblyName>Volo.Abp.Castle.Core</AssemblyName> <AssemblyName>Volo.Abp.Castle.Core</AssemblyName>
<PackageId>Volo.Abp.Castle.Core</PackageId> <PackageId>Volo.Abp.Castle.Core</PackageId>
<AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback> <AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback>

4
framework/src/Volo.Abp.Castle.Core/Volo/Abp/Castle/DynamicProxy/CastleAbpMethodInvocationAdapterBase.cs

@ -20,7 +20,7 @@ public abstract class CastleAbpMethodInvocationAdapterBase : IAbpMethodInvocatio
public MethodInfo Method => Invocation.MethodInvocationTarget ?? Invocation.Method; public MethodInfo Method => Invocation.MethodInvocationTarget ?? Invocation.Method;
public object ReturnValue { get; set; } public object ReturnValue { get; set; } = default!;
protected IInvocation Invocation { get; } protected IInvocation Invocation { get; }
@ -39,7 +39,7 @@ public abstract class CastleAbpMethodInvocationAdapterBase : IAbpMethodInvocatio
var methodParameters = Method.GetParameters(); var methodParameters = Method.GetParameters();
for (int i = 0; i < methodParameters.Length; i++) for (int i = 0; i < methodParameters.Length; i++)
{ {
dict[methodParameters[i].Name] = Invocation.Arguments[i]; dict[methodParameters[i].Name!] = Invocation.Arguments[i];
} }
return dict; return dict;

2
framework/src/Volo.Abp.Castle.Core/Volo/Abp/Castle/DynamicProxy/CastleAbpMethodInvocationAdapterWithReturnValue.cs

@ -21,6 +21,6 @@ public class CastleAbpMethodInvocationAdapterWithReturnValue<TResult> : CastleAb
public override async Task ProceedAsync() public override async Task ProceedAsync()
{ {
ReturnValue = await Proceed(Invocation, ProceedInfo); ReturnValue = (await Proceed(Invocation, ProceedInfo))!;
} }
} }

20
framework/src/Volo.Abp.Core/Volo/Abp/AbpApplicationBase.cs

@ -188,11 +188,13 @@ public abstract class AbpApplicationBase : IAbpApplication
{ {
if (!abpModule.SkipAutoServiceRegistration) if (!abpModule.SkipAutoServiceRegistration)
{ {
var assembly = module.Type.Assembly; foreach (var assembly in module.AllAssemblies)
if (!assemblies.Contains(assembly))
{ {
Services.AddAssembly(assembly); if (!assemblies.Contains(assembly))
assemblies.Add(assembly); {
Services.AddAssembly(assembly);
assemblies.Add(assembly);
}
} }
} }
} }
@ -279,11 +281,13 @@ public abstract class AbpApplicationBase : IAbpApplication
{ {
if (!abpModule.SkipAutoServiceRegistration) if (!abpModule.SkipAutoServiceRegistration)
{ {
var assembly = module.Type.Assembly; foreach (var assembly in module.AllAssemblies)
if (!assemblies.Contains(assembly))
{ {
Services.AddAssembly(assembly); if (!assemblies.Contains(assembly))
assemblies.Add(assembly); {
Services.AddAssembly(assembly);
assemblies.Add(assembly);
}
} }
} }
} }

4
framework/src/Volo.Abp.Core/Volo/Abp/AbpException.cs

@ -13,13 +13,13 @@ public class AbpException : Exception
} }
public AbpException(string message) public AbpException(string? message)
: base(message) : base(message)
{ {
} }
public AbpException(string message, Exception innerException) public AbpException(string? message, Exception? innerException)
: base(message, innerException) : base(message, innerException)
{ {

4
framework/src/Volo.Abp.Core/Volo/Abp/Modularity/AbpModuleDescriptor.cs

@ -11,6 +11,8 @@ public class AbpModuleDescriptor : IAbpModuleDescriptor
public Type Type { get; } public Type Type { get; }
public Assembly Assembly { get; } public Assembly Assembly { get; }
public List<Assembly> AllAssemblies { get; }
public IAbpModule Instance { get; } public IAbpModule Instance { get; }
@ -26,6 +28,7 @@ public class AbpModuleDescriptor : IAbpModuleDescriptor
{ {
Check.NotNull(type, nameof(type)); Check.NotNull(type, nameof(type));
Check.NotNull(instance, nameof(instance)); Check.NotNull(instance, nameof(instance));
AbpModule.CheckAbpModuleType(type);
if (!type.GetTypeInfo().IsAssignableFrom(instance.GetType())) if (!type.GetTypeInfo().IsAssignableFrom(instance.GetType()))
{ {
@ -34,6 +37,7 @@ public class AbpModuleDescriptor : IAbpModuleDescriptor
Type = type; Type = type;
Assembly = type.Assembly; Assembly = type.Assembly;
AllAssemblies = AbpModuleHelper.GetAllAssemblies(type);
Instance = instance; Instance = instance;
IsLoadedAsPlugIn = isLoadedAsPlugIn; IsLoadedAsPlugIn = isLoadedAsPlugIn;

21
framework/src/Volo.Abp.Core/Volo/Abp/Modularity/AbpModuleHelper.cs

@ -36,6 +36,27 @@ internal static class AbpModuleHelper
return dependencies; return dependencies;
} }
public static List<Assembly> GetAllAssemblies(Type moduleType)
{
var assemblies = new List<Assembly>();
var additionalAssemblyDescriptors = moduleType
.GetCustomAttributes()
.OfType<IAdditionalModuleAssemblyProvider>();
foreach (var descriptor in additionalAssemblyDescriptors)
{
foreach (var assembly in descriptor.GetAssemblies())
{
assemblies.AddIfNotContains(assembly);
}
}
assemblies.Add(moduleType.Assembly);
return assemblies;
}
private static void AddModuleAndDependenciesRecursively( private static void AddModuleAndDependenciesRecursively(
List<Type> moduleTypes, List<Type> moduleTypes,

24
framework/src/Volo.Abp.Core/Volo/Abp/Modularity/AdditionalAssemblyAttribute.cs

@ -0,0 +1,24 @@
using System;
using System.Linq;
using System.Reflection;
namespace Volo.Abp.Modularity;
/// <summary>
/// Used to define additional assemblies for a module.
/// </summary>
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
public class AdditionalAssemblyAttribute : Attribute, IAdditionalModuleAssemblyProvider
{
public Type[] TypesInAssemblies { get; }
public AdditionalAssemblyAttribute(params Type[]? typesInAssemblies)
{
TypesInAssemblies = typesInAssemblies ?? Type.EmptyTypes;
}
public virtual Assembly[] GetAssemblies()
{
return TypesInAssemblies.Select(t => t.Assembly).Distinct().ToArray();
}
}

4
framework/src/Volo.Abp.Core/Volo/Abp/Modularity/DependsOnAttribute.cs

@ -1,5 +1,4 @@
using System; using System;
using JetBrains.Annotations;
namespace Volo.Abp.Modularity; namespace Volo.Abp.Modularity;
@ -9,12 +8,11 @@ namespace Volo.Abp.Modularity;
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true)] [AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
public class DependsOnAttribute : Attribute, IDependedTypesProvider public class DependsOnAttribute : Attribute, IDependedTypesProvider
{ {
[NotNull]
public Type[] DependedTypes { get; } public Type[] DependedTypes { get; }
public DependsOnAttribute(params Type[]? dependedTypes) public DependsOnAttribute(params Type[]? dependedTypes)
{ {
DependedTypes = dependedTypes ?? new Type[0]; DependedTypes = dependedTypes ?? Type.EmptyTypes;
} }
public virtual Type[] GetDependedTypes() public virtual Type[] GetDependedTypes()

23
framework/src/Volo.Abp.Core/Volo/Abp/Modularity/IAbpModuleDescriptor.cs

@ -6,13 +6,36 @@ namespace Volo.Abp.Modularity;
public interface IAbpModuleDescriptor public interface IAbpModuleDescriptor
{ {
/// <summary>
/// Type of the module class.
/// </summary>
Type Type { get; } Type Type { get; }
/// <summary>
/// Main assembly that defines the module <see cref="Type"/>.
/// </summary>
Assembly Assembly { get; } Assembly Assembly { get; }
/// <summary>
/// All the assemblies of the module.
/// Includes the main <see cref="Assembly"/> and other assemblies defined
/// on the module <see cref="Type"/> using the <see cref="AdditionalAssemblyAttribute"/> attribute.
/// </summary>
List<Assembly> AllAssemblies { get; }
/// <summary>
/// The instance of the module class (singleton).
/// </summary>
IAbpModule Instance { get; } IAbpModule Instance { get; }
/// <summary>
/// Is this module loaded as a plug-in?
/// </summary>
bool IsLoadedAsPlugIn { get; } bool IsLoadedAsPlugIn { get; }
/// <summary>
/// Modules on which this module depends on.
/// A module can depend on another module using the <see cref="DependsOnAttribute"/> attribute.
/// </summary>
IReadOnlyList<IAbpModuleDescriptor> Dependencies { get; } IReadOnlyList<IAbpModuleDescriptor> Dependencies { get; }
} }

8
framework/src/Volo.Abp.Core/Volo/Abp/Modularity/IAdditionalModuleAssemblyProvider.cs

@ -0,0 +1,8 @@
using System.Reflection;
namespace Volo.Abp.Modularity;
public interface IAdditionalModuleAssemblyProvider
{
Assembly[] GetAssemblies();
}

2
framework/src/Volo.Abp.Core/Volo/Abp/Reflection/AssemblyFinder.cs

@ -29,7 +29,7 @@ public class AssemblyFinder : IAssemblyFinder
foreach (var module in _moduleContainer.Modules) foreach (var module in _moduleContainer.Modules)
{ {
assemblies.Add(module.Type.Assembly); assemblies.AddRange(module.AllAssemblies);
} }
return assemblies.Distinct().ToImmutableList(); return assemblies.Distinct().ToImmutableList();

2
framework/src/Volo.Abp.Data/Volo.Abp.Data.csproj

@ -5,6 +5,8 @@
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>netstandard2.0;netstandard2.1;net7.0</TargetFrameworks> <TargetFrameworks>netstandard2.0;netstandard2.1;net7.0</TargetFrameworks>
<Nullable>enable</Nullable>
<WarningsAsErrors>Nullable</WarningsAsErrors>
<AssemblyName>Volo.Abp.Data</AssemblyName> <AssemblyName>Volo.Abp.Data</AssemblyName>
<PackageId>Volo.Abp.Data</PackageId> <PackageId>Volo.Abp.Data</PackageId>
<AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback> <AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback>

2
framework/src/Volo.Abp.Data/Volo/Abp/Data/AbpCommonDbProperties.cs

@ -13,5 +13,5 @@ public static class AbpCommonDbProperties
/// <summary> /// <summary>
/// Default value: null. /// Default value: null.
/// </summary> /// </summary>
public static string DbSchema { get; set; } = null; public static string? DbSchema { get; set; } = null;
} }

8
framework/src/Volo.Abp.Data/Volo/Abp/Data/AbpDataMigrationEnvironmentExtensions.cs

@ -6,17 +6,17 @@ namespace Volo.Abp.Data;
public static class AbpDataMigrationEnvironmentExtensions public static class AbpDataMigrationEnvironmentExtensions
{ {
public static void AddDataMigrationEnvironment(this AbpApplicationCreationOptions options, AbpDataMigrationEnvironment environment = null) public static void AddDataMigrationEnvironment(this AbpApplicationCreationOptions options, AbpDataMigrationEnvironment? environment = null)
{ {
options.Services.AddDataMigrationEnvironment(environment ?? new AbpDataMigrationEnvironment()); options.Services.AddDataMigrationEnvironment(environment ?? new AbpDataMigrationEnvironment());
} }
public static void AddDataMigrationEnvironment(this IServiceCollection services, AbpDataMigrationEnvironment environment = null) public static void AddDataMigrationEnvironment(this IServiceCollection services, AbpDataMigrationEnvironment? environment = null)
{ {
services.AddObjectAccessor<AbpDataMigrationEnvironment>(environment ?? new AbpDataMigrationEnvironment()); services.AddObjectAccessor<AbpDataMigrationEnvironment>(environment ?? new AbpDataMigrationEnvironment());
} }
public static AbpDataMigrationEnvironment GetDataMigrationEnvironment(this IServiceCollection services) public static AbpDataMigrationEnvironment? GetDataMigrationEnvironment(this IServiceCollection services)
{ {
return services.GetObjectOrNull<AbpDataMigrationEnvironment>(); return services.GetObjectOrNull<AbpDataMigrationEnvironment>();
} }
@ -26,7 +26,7 @@ public static class AbpDataMigrationEnvironmentExtensions
return services.GetDataMigrationEnvironment() != null; return services.GetDataMigrationEnvironment() != null;
} }
public static AbpDataMigrationEnvironment GetDataMigrationEnvironment(this IServiceProvider serviceProvider) public static AbpDataMigrationEnvironment? GetDataMigrationEnvironment(this IServiceProvider serviceProvider)
{ {
return serviceProvider.GetService<IObjectAccessor<AbpDataMigrationEnvironment>>()?.Value; return serviceProvider.GetService<IObjectAccessor<AbpDataMigrationEnvironment>>()?.Value;
} }

3
framework/src/Volo.Abp.Data/Volo/Abp/Data/AbpDatabaseInfoDictionary.cs

@ -13,8 +13,7 @@ public class AbpDatabaseInfoDictionary : Dictionary<string, AbpDatabaseInfo>
ConnectionIndex = new Dictionary<string, AbpDatabaseInfo>(); ConnectionIndex = new Dictionary<string, AbpDatabaseInfo>();
} }
[CanBeNull] public AbpDatabaseInfo? GetMappedDatabaseOrNull(string connectionStringName)
public AbpDatabaseInfo GetMappedDatabaseOrNull(string connectionStringName)
{ {
return ConnectionIndex.GetOrDefault(connectionStringName); return ConnectionIndex.GetOrDefault(connectionStringName);
} }

2
framework/src/Volo.Abp.Data/Volo/Abp/Data/AbpDbConnectionOptions.cs

@ -15,7 +15,7 @@ public class AbpDbConnectionOptions
Databases = new AbpDatabaseInfoDictionary(); Databases = new AbpDatabaseInfoDictionary();
} }
public string GetConnectionStringOrNull( public string? GetConnectionStringOrNull(
string connectionStringName, string connectionStringName,
bool fallbackToDatabaseMappings = true, bool fallbackToDatabaseMappings = true,
bool fallbackToDefault = true) bool fallbackToDefault = true)

2
framework/src/Volo.Abp.Data/Volo/Abp/Data/AppliedDatabaseMigrationsEto.cs

@ -7,6 +7,6 @@ namespace Volo.Abp.Data;
[EventName("abp.data.applied_database_migrations")] [EventName("abp.data.applied_database_migrations")]
public class AppliedDatabaseMigrationsEto public class AppliedDatabaseMigrationsEto
{ {
public string DatabaseName { get; set; } public string DatabaseName { get; set; } = default!;
public Guid? TenantId { get; set; } public Guid? TenantId { get; set; }
} }

2
framework/src/Volo.Abp.Data/Volo/Abp/Data/ApplyDatabaseMigrationsEto.cs

@ -10,5 +10,5 @@ public class ApplyDatabaseMigrationsEto : EtoBase
{ {
public Guid? TenantId { get; set; } public Guid? TenantId { get; set; }
public string DatabaseName { get; set; } public string DatabaseName { get; set; } = default!;
} }

4
framework/src/Volo.Abp.Data/Volo/Abp/Data/ConcurrencyStampExtensions.cs

@ -7,11 +7,11 @@ namespace Volo.Abp.Data;
public static class ConcurrencyStampExtensions public static class ConcurrencyStampExtensions
{ {
public static void SetConcurrencyStampIfNotNull(this IHasConcurrencyStamp entity, [CanBeNull] string concurrencyStamp) public static void SetConcurrencyStampIfNotNull(this IHasConcurrencyStamp entity, string? concurrencyStamp)
{ {
if (!concurrencyStamp.IsNullOrEmpty()) if (!concurrencyStamp.IsNullOrEmpty())
{ {
entity.ConcurrencyStamp = concurrencyStamp; entity.ConcurrencyStamp = concurrencyStamp!;
} }
} }
} }

2
framework/src/Volo.Abp.Data/Volo/Abp/Data/ConnectionStringNameAttribute.cs

@ -27,7 +27,7 @@ public class ConnectionStringNameAttribute : Attribute
if (nameAttribute == null) if (nameAttribute == null)
{ {
return type.FullName; return type.FullName!;
} }
return nameAttribute.Name; return nameAttribute.Name;

4
framework/src/Volo.Abp.Data/Volo/Abp/Data/ConnectionStrings.cs

@ -4,11 +4,11 @@ using System.Collections.Generic;
namespace Volo.Abp.Data; namespace Volo.Abp.Data;
[Serializable] [Serializable]
public class ConnectionStrings : Dictionary<string, string> public class ConnectionStrings : Dictionary<string, string?>
{ {
public const string DefaultConnectionStringName = "Default"; public const string DefaultConnectionStringName = "Default";
public string Default { public string? Default {
get => this.GetOrDefault(DefaultConnectionStringName); get => this.GetOrDefault(DefaultConnectionStringName);
set => this[DefaultConnectionStringName] = value; set => this[DefaultConnectionStringName] = value;
} }

12
framework/src/Volo.Abp.Data/Volo/Abp/Data/DataFilter.cs

@ -42,10 +42,10 @@ public class DataFilter : IDataFilter, ISingletonDependency
private IDataFilter<TFilter> GetFilter<TFilter>() private IDataFilter<TFilter> GetFilter<TFilter>()
where TFilter : class where TFilter : class
{ {
return _filters.GetOrAdd( return (_filters.GetOrAdd(
typeof(TFilter), typeof(TFilter),
factory: () => _serviceProvider.GetRequiredService<IDataFilter<TFilter>>() factory: () => _serviceProvider.GetRequiredService<IDataFilter<TFilter>>()
) as IDataFilter<TFilter>; ) as IDataFilter<TFilter>)!;
} }
} }
@ -55,7 +55,7 @@ public class DataFilter<TFilter> : IDataFilter<TFilter>
public bool IsEnabled { public bool IsEnabled {
get { get {
EnsureInitialized(); EnsureInitialized();
return _filter.Value.IsEnabled; return _filter.Value!.IsEnabled;
} }
} }
@ -76,7 +76,7 @@ public class DataFilter<TFilter> : IDataFilter<TFilter>
return NullDisposable.Instance; return NullDisposable.Instance;
} }
_filter.Value.IsEnabled = true; _filter.Value!.IsEnabled = true;
return new DisposeAction(() => Disable()); return new DisposeAction(() => Disable());
} }
@ -88,7 +88,7 @@ public class DataFilter<TFilter> : IDataFilter<TFilter>
return NullDisposable.Instance; return NullDisposable.Instance;
} }
_filter.Value.IsEnabled = false; _filter.Value!.IsEnabled = false;
return new DisposeAction(() => Enable()); return new DisposeAction(() => Enable());
} }

9
framework/src/Volo.Abp.Data/Volo/Abp/Data/DataSeedContext.cs

@ -16,8 +16,7 @@ public class DataSeedContext
/// Returns the value in the <see cref="Properties"/> dictionary by given <paramref name="name"/>. /// Returns the value in the <see cref="Properties"/> dictionary by given <paramref name="name"/>.
/// Returns null if given <paramref name="name"/> is not present in the <see cref="Properties"/> dictionary. /// Returns null if given <paramref name="name"/> is not present in the <see cref="Properties"/> dictionary.
/// </returns> /// </returns>
[CanBeNull] public object? this[string name] {
public object this[string name] {
get => Properties.GetOrDefault(name); get => Properties.GetOrDefault(name);
set => Properties[name] = value; set => Properties[name] = value;
} }
@ -26,19 +25,19 @@ public class DataSeedContext
/// Can be used to get/set custom properties. /// Can be used to get/set custom properties.
/// </summary> /// </summary>
[NotNull] [NotNull]
public Dictionary<string, object> Properties { get; } public Dictionary<string, object?> Properties { get; }
public DataSeedContext(Guid? tenantId = null) public DataSeedContext(Guid? tenantId = null)
{ {
TenantId = tenantId; TenantId = tenantId;
Properties = new Dictionary<string, object>(); Properties = new Dictionary<string, object?>();
} }
/// <summary> /// <summary>
/// Sets a property in the <see cref="Properties"/> dictionary. /// Sets a property in the <see cref="Properties"/> dictionary.
/// This is a shortcut for nested calls on this object. /// This is a shortcut for nested calls on this object.
/// </summary> /// </summary>
public virtual DataSeedContext WithProperty(string key, object value) public virtual DataSeedContext WithProperty(string key, object? value)
{ {
Properties[key] = value; Properties[key] = value;
return this; return this;

4
framework/src/Volo.Abp.Data/Volo/Abp/Data/DataSeeder.cs

@ -33,9 +33,9 @@ public class DataSeeder : IDataSeeder, ITransientDependency
foreach (var contributorType in Options.Contributors) foreach (var contributorType in Options.Contributors)
{ {
var options = context.Properties.TryGetValue(DataSeederExtensions.SeedInSeparateUowOptions, out var uowOptions) var options = context.Properties.TryGetValue(DataSeederExtensions.SeedInSeparateUowOptions, out var uowOptions)
? (AbpUnitOfWorkOptions) uowOptions ? (AbpUnitOfWorkOptions) uowOptions!
: new AbpUnitOfWorkOptions(); : new AbpUnitOfWorkOptions();
var requiresNew = context.Properties.TryGetValue(DataSeederExtensions.SeedInSeparateUowRequiresNew, out var obj) && (bool) obj; var requiresNew = context.Properties.TryGetValue(DataSeederExtensions.SeedInSeparateUowRequiresNew, out var obj) && (bool) obj!;
using (var uow = manager.Begin(options, requiresNew)) using (var uow = manager.Begin(options, requiresNew))
{ {

2
framework/src/Volo.Abp.Data/Volo/Abp/Data/DataSeederExtensions.cs

@ -15,7 +15,7 @@ public static class DataSeederExtensions
return seeder.SeedAsync(new DataSeedContext(tenantId)); return seeder.SeedAsync(new DataSeedContext(tenantId));
} }
public static Task SeedInSeparateUowAsync(this IDataSeeder seeder, Guid? tenantId = null, AbpUnitOfWorkOptions options = null, bool requiresNew = false) public static Task SeedInSeparateUowAsync(this IDataSeeder seeder, Guid? tenantId = null, AbpUnitOfWorkOptions? options = null, bool requiresNew = false)
{ {
var context = new DataSeedContext(tenantId); var context = new DataSeedContext(tenantId);
context.WithProperty(SeedInSeparateUow, true); context.WithProperty(SeedInSeparateUow, true);

10
framework/src/Volo.Abp.Data/Volo/Abp/Data/DefaultConnectionStringResolver.cs

@ -16,17 +16,17 @@ public class DefaultConnectionStringResolver : IConnectionStringResolver, ITrans
} }
[Obsolete("Use ResolveAsync method.")] [Obsolete("Use ResolveAsync method.")]
public virtual string Resolve(string connectionStringName = null) public virtual string Resolve(string? connectionStringName = null)
{ {
return ResolveInternal(connectionStringName); return ResolveInternal(connectionStringName)!;
} }
public virtual Task<string> ResolveAsync(string connectionStringName = null) public virtual Task<string> ResolveAsync(string? connectionStringName = null)
{ {
return Task.FromResult(ResolveInternal(connectionStringName)); return Task.FromResult(ResolveInternal(connectionStringName))!;
} }
private string ResolveInternal(string connectionStringName) private string? ResolveInternal(string? connectionStringName)
{ {
if (connectionStringName == null) if (connectionStringName == null)
{ {

4
framework/src/Volo.Abp.Data/Volo/Abp/Data/IConnectionStringResolver.cs

@ -8,8 +8,8 @@ public interface IConnectionStringResolver
{ {
[NotNull] [NotNull]
[Obsolete("Use ResolveAsync method.")] [Obsolete("Use ResolveAsync method.")]
string Resolve(string connectionStringName = null); string Resolve(string? connectionStringName = null);
[NotNull] [NotNull]
Task<string> ResolveAsync(string connectionStringName = null); Task<string> ResolveAsync(string? connectionStringName = null);
} }

2
framework/src/Volo.Abp.ExceptionHandling/Volo.Abp.ExceptionHandling.csproj

@ -5,6 +5,8 @@
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>netstandard2.0;netstandard2.1;net7.0</TargetFrameworks> <TargetFrameworks>netstandard2.0;netstandard2.1;net7.0</TargetFrameworks>
<Nullable>enable</Nullable>
<WarningsAsErrors>Nullable</WarningsAsErrors>
<GenerateEmbeddedFilesManifest>true</GenerateEmbeddedFilesManifest> <GenerateEmbeddedFilesManifest>true</GenerateEmbeddedFilesManifest>
<RootNamespace /> <RootNamespace />
</PropertyGroup> </PropertyGroup>

24
framework/src/Volo.Abp.ExceptionHandling/Volo/Abp/AspNetCore/ExceptionHandling/DefaultExceptionToErrorInfoConverter.cs

@ -54,7 +54,7 @@ public class DefaultExceptionToErrorInfoConverter : IExceptionToErrorInfoConvert
return errorInfo; return errorInfo;
} }
public RemoteServiceErrorInfo Convert(Exception exception, Action<AbpExceptionHandlingOptions> options = null) public RemoteServiceErrorInfo Convert(Exception exception, Action<AbpExceptionHandlingOptions>? options = null)
{ {
var exceptionHandlingOptions = CreateDefaultOptions(); var exceptionHandlingOptions = CreateDefaultOptions();
options?.Invoke(exceptionHandlingOptions); options?.Invoke(exceptionHandlingOptions);
@ -90,7 +90,7 @@ public class DefaultExceptionToErrorInfoConverter : IExceptionToErrorInfoConvert
if (exception is EntityNotFoundException) if (exception is EntityNotFoundException)
{ {
return CreateEntityNotFoundError(exception as EntityNotFoundException); return CreateEntityNotFoundError((exception as EntityNotFoundException)!);
} }
var errorInfo = new RemoteServiceErrorInfo(); var errorInfo = new RemoteServiceErrorInfo();
@ -110,10 +110,10 @@ public class DefaultExceptionToErrorInfoConverter : IExceptionToErrorInfoConvert
if (errorInfo.Details.IsNullOrEmpty()) if (errorInfo.Details.IsNullOrEmpty())
{ {
errorInfo.Details = GetValidationErrorNarrative(exception as IHasValidationErrors); errorInfo.Details = GetValidationErrorNarrative((exception as IHasValidationErrors)!);
} }
errorInfo.ValidationErrors = GetValidationErrorInfos(exception as IHasValidationErrors); errorInfo.ValidationErrors = GetValidationErrorInfos((exception as IHasValidationErrors)!);
} }
TryToLocalizeExceptionMessage(exception, errorInfo); TryToLocalizeExceptionMessage(exception, errorInfo);
@ -146,7 +146,7 @@ public class DefaultExceptionToErrorInfoConverter : IExceptionToErrorInfoConvert
} }
if (exceptionWithErrorCode.Code.IsNullOrWhiteSpace() || if (exceptionWithErrorCode.Code.IsNullOrWhiteSpace() ||
!exceptionWithErrorCode.Code.Contains(":")) !exceptionWithErrorCode.Code!.Contains(":"))
{ {
return; return;
} }
@ -197,10 +197,8 @@ public class DefaultExceptionToErrorInfoConverter : IExceptionToErrorInfoConvert
protected virtual Exception TryToGetActualException(Exception exception) protected virtual Exception TryToGetActualException(Exception exception)
{ {
if (exception is AggregateException && exception.InnerException != null) if (exception is AggregateException aggException && aggException.InnerException != null)
{ {
var aggException = exception as AggregateException;
if (aggException.InnerException is AbpValidationException || if (aggException.InnerException is AbpValidationException ||
aggException.InnerException is AbpAuthorizationException || aggException.InnerException is AbpAuthorizationException ||
aggException.InnerException is EntityNotFoundException || aggException.InnerException is EntityNotFoundException ||
@ -223,7 +221,7 @@ public class DefaultExceptionToErrorInfoConverter : IExceptionToErrorInfoConvert
if (exception is AbpValidationException) if (exception is AbpValidationException)
{ {
errorInfo.ValidationErrors = GetValidationErrorInfos(exception as AbpValidationException); errorInfo.ValidationErrors = GetValidationErrorInfos((exception as AbpValidationException)!);
} }
return errorInfo; return errorInfo;
@ -246,9 +244,8 @@ public class DefaultExceptionToErrorInfoConverter : IExceptionToErrorInfoConvert
} }
//Additional info for AbpValidationException //Additional info for AbpValidationException
if (exception is AbpValidationException) if (exception is AbpValidationException validationException)
{ {
var validationException = exception as AbpValidationException;
if (validationException.ValidationErrors.Count > 0) if (validationException.ValidationErrors.Count > 0)
{ {
detailBuilder.AppendLine(GetValidationErrorNarrative(validationException)); detailBuilder.AppendLine(GetValidationErrorNarrative(validationException));
@ -268,9 +265,8 @@ public class DefaultExceptionToErrorInfoConverter : IExceptionToErrorInfoConvert
} }
//Inner exceptions for AggregateException //Inner exceptions for AggregateException
if (exception is AggregateException) if (exception is AggregateException aggException)
{ {
var aggException = exception as AggregateException;
if (aggException.InnerExceptions.IsNullOrEmpty()) if (aggException.InnerExceptions.IsNullOrEmpty())
{ {
return; return;
@ -289,7 +285,7 @@ public class DefaultExceptionToErrorInfoConverter : IExceptionToErrorInfoConvert
foreach (var validationResult in validationException.ValidationErrors) foreach (var validationResult in validationException.ValidationErrors)
{ {
var validationError = new RemoteServiceValidationErrorInfo(validationResult.ErrorMessage); var validationError = new RemoteServiceValidationErrorInfo(validationResult.ErrorMessage!);
if (validationResult.MemberNames != null && validationResult.MemberNames.Any()) if (validationResult.MemberNames != null && validationResult.MemberNames.Any())
{ {

2
framework/src/Volo.Abp.ExceptionHandling/Volo/Abp/AspNetCore/ExceptionHandling/IExceptionToErrorInfoConverter.cs

@ -24,5 +24,5 @@ public interface IExceptionToErrorInfoConverter
/// <param name="exception">The exception.</param> /// <param name="exception">The exception.</param>
/// <param name="options">Additional options.</param> /// <param name="options">Additional options.</param>
/// <returns>Error info or null</returns> /// <returns>Error info or null</returns>
RemoteServiceErrorInfo Convert(Exception exception, Action<AbpExceptionHandlingOptions> options = null); RemoteServiceErrorInfo Convert(Exception exception, Action<AbpExceptionHandlingOptions>? options = null);
} }

8
framework/src/Volo.Abp.ExceptionHandling/Volo/Abp/Domain/Entities/EntityNotFoundException.cs

@ -10,12 +10,12 @@ public class EntityNotFoundException : AbpException
/// <summary> /// <summary>
/// Type of the entity. /// Type of the entity.
/// </summary> /// </summary>
public Type EntityType { get; set; } public Type? EntityType { get; set; }
/// <summary> /// <summary>
/// Id of the Entity. /// Id of the Entity.
/// </summary> /// </summary>
public object Id { get; set; } public object? Id { get; set; }
/// <summary> /// <summary>
/// Creates a new <see cref="EntityNotFoundException"/> object. /// Creates a new <see cref="EntityNotFoundException"/> object.
@ -37,7 +37,7 @@ public class EntityNotFoundException : AbpException
/// <summary> /// <summary>
/// Creates a new <see cref="EntityNotFoundException"/> object. /// Creates a new <see cref="EntityNotFoundException"/> object.
/// </summary> /// </summary>
public EntityNotFoundException(Type entityType, object id) public EntityNotFoundException(Type entityType, object? id)
: this(entityType, id, null) : this(entityType, id, null)
{ {
@ -46,7 +46,7 @@ public class EntityNotFoundException : AbpException
/// <summary> /// <summary>
/// Creates a new <see cref="EntityNotFoundException"/> object. /// Creates a new <see cref="EntityNotFoundException"/> object.
/// </summary> /// </summary>
public EntityNotFoundException(Type entityType, object id, Exception innerException) public EntityNotFoundException(Type entityType, object? id, Exception? innerException)
: base( : base(
id == null id == null
? $"There is no such an entity given id. Entity type: {entityType.FullName}" ? $"There is no such an entity given id. Entity type: {entityType.FullName}"

10
framework/src/Volo.Abp.ExceptionHandling/Volo/Abp/Http/Client/AbpRemoteCallException.cs

@ -9,18 +9,18 @@ public class AbpRemoteCallException : AbpException, IHasErrorCode, IHasErrorDeta
{ {
public int HttpStatusCode { get; set; } public int HttpStatusCode { get; set; }
public string Code => Error?.Code; public string? Code => Error?.Code;
public string Details => Error?.Details; public string? Details => Error?.Details;
public RemoteServiceErrorInfo Error { get; set; } public RemoteServiceErrorInfo? Error { get; set; }
public AbpRemoteCallException() public AbpRemoteCallException()
{ {
} }
public AbpRemoteCallException(string message, Exception innerException = null) public AbpRemoteCallException(string message, Exception? innerException = null)
: base(message, innerException) : base(message, innerException)
{ {
@ -32,7 +32,7 @@ public class AbpRemoteCallException : AbpException, IHasErrorCode, IHasErrorDeta
} }
public AbpRemoteCallException(RemoteServiceErrorInfo error, Exception innerException = null) public AbpRemoteCallException(RemoteServiceErrorInfo error, Exception? innerException = null)
: base(error.Message, innerException) : base(error.Message, innerException)
{ {
Error = error; Error = error;

12
framework/src/Volo.Abp.ExceptionHandling/Volo/Abp/Http/RemoteServiceErrorInfo.cs

@ -12,27 +12,27 @@ public class RemoteServiceErrorInfo
/// <summary> /// <summary>
/// Error code. /// Error code.
/// </summary> /// </summary>
public string Code { get; set; } public string? Code { get; set; }
/// <summary> /// <summary>
/// Error message. /// Error message.
/// </summary> /// </summary>
public string Message { get; set; } public string? Message { get; set; }
/// <summary> /// <summary>
/// Error details. /// Error details.
/// </summary> /// </summary>
public string Details { get; set; } public string? Details { get; set; }
/// <summary> /// <summary>
/// Error data. /// Error data.
/// </summary> /// </summary>
public IDictionary Data { get; set; } public IDictionary? Data { get; set; }
/// <summary> /// <summary>
/// Validation errors if exists. /// Validation errors if exists.
/// </summary> /// </summary>
public RemoteServiceValidationErrorInfo[] ValidationErrors { get; set; } public RemoteServiceValidationErrorInfo[]? ValidationErrors { get; set; }
/// <summary> /// <summary>
/// Creates a new instance of <see cref="RemoteServiceErrorInfo"/>. /// Creates a new instance of <see cref="RemoteServiceErrorInfo"/>.
@ -49,7 +49,7 @@ public class RemoteServiceErrorInfo
/// <param name="details">Error details</param> /// <param name="details">Error details</param>
/// <param name="message">Error message</param> /// <param name="message">Error message</param>
/// <param name="data">Error data</param> /// <param name="data">Error data</param>
public RemoteServiceErrorInfo(string message, string details = null, string code = null, IDictionary data = null) public RemoteServiceErrorInfo(string message, string? details = null, string? code = null, IDictionary? data = null)
{ {
Message = message; Message = message;
Details = details; Details = details;

4
framework/src/Volo.Abp.ExceptionHandling/Volo/Abp/Http/RemoteServiceValidationErrorInfo.cs

@ -11,12 +11,12 @@ public class RemoteServiceValidationErrorInfo
/// <summary> /// <summary>
/// Validation error message. /// Validation error message.
/// </summary> /// </summary>
public string Message { get; set; } public string Message { get; set; } = default!;
/// <summary> /// <summary>
/// Relate invalid members (fields/properties). /// Relate invalid members (fields/properties).
/// </summary> /// </summary>
public string[] Members { get; set; } public string[] Members { get; set; } = default!;
/// <summary> /// <summary>
/// Creates a new instance of <see cref="RemoteServiceValidationErrorInfo"/>. /// Creates a new instance of <see cref="RemoteServiceValidationErrorInfo"/>.

2
framework/src/Volo.Abp.Guids/Volo.Abp.Guids.csproj

@ -5,6 +5,8 @@
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>netstandard2.0;netstandard2.1;net7.0</TargetFrameworks> <TargetFrameworks>netstandard2.0;netstandard2.1;net7.0</TargetFrameworks>
<Nullable>enable</Nullable>
<WarningsAsErrors>Nullable</WarningsAsErrors>
<AssemblyName>Volo.Abp.Guids</AssemblyName> <AssemblyName>Volo.Abp.Guids</AssemblyName>
<PackageId>Volo.Abp.Guids</PackageId> <PackageId>Volo.Abp.Guids</PackageId>
<AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback> <AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback>

2
framework/src/Volo.Abp.Http.Client.Web/Volo/Abp/Http/Client/Web/AbpHttpClientWebModule.cs

@ -31,7 +31,7 @@ public class AbpHttpClientWebModule : AbpModule
.ServiceProvider .ServiceProvider
.GetRequiredService<IModuleContainer>() .GetRequiredService<IModuleContainer>()
.Modules .Modules
.Select(m => m.Type.Assembly) .SelectMany(m => m.AllAssemblies)
.Where(a => a.GetTypes().Any(AbpHttpClientProxyHelper.IsClientProxyService)) .Where(a => a.GetTypes().Any(AbpHttpClientProxyHelper.IsClientProxyService))
.Distinct()) .Distinct())
{ {

2
framework/src/Volo.Abp.Json.Abstractions/Volo.Abp.Json.Abstractions.csproj

@ -5,6 +5,8 @@
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>netstandard2.0;netstandard2.1;net7.0</TargetFrameworks> <TargetFrameworks>netstandard2.0;netstandard2.1;net7.0</TargetFrameworks>
<Nullable>enable</Nullable>
<WarningsAsErrors>Nullable</WarningsAsErrors>
<PackageId>Volo.Abp.Json.Abstractions</PackageId> <PackageId>Volo.Abp.Json.Abstractions</PackageId>
<AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback> <AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute> <GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>

2
framework/src/Volo.Abp.Json.Abstractions/Volo/Abp/Json/AbpJsonOptions.cs

@ -12,7 +12,7 @@ public class AbpJsonOptions
/// <summary> /// <summary>
/// Format of output json date, Null or empty string means default format. /// Format of output json date, Null or empty string means default format.
/// </summary> /// </summary>
public string OutputDateTimeFormat { get; set; } public string? OutputDateTimeFormat { get; set; }
public AbpJsonOptions() public AbpJsonOptions()
{ {

2
framework/src/Volo.Abp.Json.Newtonsoft/Volo.Abp.Json.Newtonsoft.csproj

@ -5,6 +5,8 @@
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>netstandard2.0;netstandard2.1;net7.0</TargetFrameworks> <TargetFrameworks>netstandard2.0;netstandard2.1;net7.0</TargetFrameworks>
<Nullable>enable</Nullable>
<WarningsAsErrors>Nullable</WarningsAsErrors>
<AssemblyName>Volo.Abp.Json.Newtonsoft</AssemblyName> <AssemblyName>Volo.Abp.Json.Newtonsoft</AssemblyName>
<PackageId>Volo.Abp.Json.Newtonsoft</PackageId> <PackageId>Volo.Abp.Json.Newtonsoft</PackageId>
<AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback> <AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback>

10
framework/src/Volo.Abp.Json.Newtonsoft/Volo/Abp/Json/Newtonsoft/AbpDateTimeConverter.cs

@ -31,7 +31,7 @@ public class AbpDateTimeConverter : DateTimeConverterBase, ITransientDependency
return objectType == typeof(DateTime) || objectType == typeof(DateTime?); return objectType == typeof(DateTime) || objectType == typeof(DateTime?);
} }
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) public override object? ReadJson(JsonReader reader, Type objectType, object? existingValue, JsonSerializer serializer)
{ {
var nullable = Nullable.GetUnderlyingType(objectType) != null; var nullable = Nullable.GetUnderlyingType(objectType) != null;
if (reader.TokenType == JsonToken.Null) if (reader.TokenType == JsonToken.Null)
@ -46,7 +46,7 @@ public class AbpDateTimeConverter : DateTimeConverterBase, ITransientDependency
if (reader.TokenType == JsonToken.Date) if (reader.TokenType == JsonToken.Date)
{ {
return _clock.Normalize(reader.Value.To<DateTime>()); return _clock.Normalize(reader.Value!.To<DateTime>());
} }
if (reader.TokenType != JsonToken.String) if (reader.TokenType != JsonToken.String)
@ -72,11 +72,11 @@ public class AbpDateTimeConverter : DateTimeConverterBase, ITransientDependency
} }
} }
var date = DateTime.Parse(dateText, _culture, _dateTimeStyles); var date = DateTime.Parse(dateText!, _culture, _dateTimeStyles);
return _clock.Normalize(date); return _clock.Normalize(date);
} }
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) public override void WriteJson(JsonWriter writer, object? value, JsonSerializer serializer)
{ {
if (value != null) if (value != null)
{ {
@ -97,7 +97,7 @@ public class AbpDateTimeConverter : DateTimeConverterBase, ITransientDependency
} }
else else
{ {
throw new JsonSerializationException($"Unexpected value when converting date. Expected DateTime or DateTimeOffset, got {value.GetType()}."); throw new JsonSerializationException($"Unexpected value when converting date. Expected DateTime or DateTimeOffset, got {value?.GetType()}.");
} }
} }

4
framework/src/Volo.Abp.Json.Newtonsoft/Volo/Abp/Json/Newtonsoft/AbpNewtonsoftJsonSerializer.cs

@ -26,12 +26,12 @@ public class AbpNewtonsoftJsonSerializer : IJsonSerializer, ITransientDependency
public T Deserialize<T>(string jsonString, bool camelCase = true) public T Deserialize<T>(string jsonString, bool camelCase = true)
{ {
return JsonConvert.DeserializeObject<T>(jsonString, CreateJsonSerializerOptions(camelCase)); return JsonConvert.DeserializeObject<T>(jsonString, CreateJsonSerializerOptions(camelCase))!;
} }
public object Deserialize(Type type, string jsonString, bool camelCase = true) public object Deserialize(Type type, string jsonString, bool camelCase = true)
{ {
return JsonConvert.DeserializeObject(jsonString, type, CreateJsonSerializerOptions(camelCase)); return JsonConvert.DeserializeObject(jsonString, type, CreateJsonSerializerOptions(camelCase))!;
} }
private readonly static ConcurrentDictionary<object, JsonSerializerSettings> JsonSerializerOptionsCache = private readonly static ConcurrentDictionary<object, JsonSerializerSettings> JsonSerializerOptionsCache =

2
framework/src/Volo.Abp.Json.SystemTextJson/Volo.Abp.Json.SystemTextJson.csproj

@ -5,6 +5,8 @@
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>netstandard2.0;netstandard2.1;net7.0</TargetFrameworks> <TargetFrameworks>netstandard2.0;netstandard2.1;net7.0</TargetFrameworks>
<Nullable>enable</Nullable>
<WarningsAsErrors>Nullable</WarningsAsErrors>
<AssemblyName>Volo.Abp.Json.SystemTextJson</AssemblyName> <AssemblyName>Volo.Abp.Json.SystemTextJson</AssemblyName>
<PackageId>Volo.Abp.Json.SystemTextJson</PackageId> <PackageId>Volo.Abp.Json.SystemTextJson</PackageId>
<AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback> <AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback>

4
framework/src/Volo.Abp.Json.SystemTextJson/Volo/Abp/Json/SystemTextJson/AbpSystemTextJsonSerializer.cs

@ -22,12 +22,12 @@ public class AbpSystemTextJsonSerializer : IJsonSerializer, ITransientDependency
public T Deserialize<T>(string jsonString, bool camelCase = true) public T Deserialize<T>(string jsonString, bool camelCase = true)
{ {
return JsonSerializer.Deserialize<T>(jsonString, CreateJsonSerializerOptions(camelCase)); return JsonSerializer.Deserialize<T>(jsonString, CreateJsonSerializerOptions(camelCase))!;
} }
public object Deserialize(Type type, string jsonString, bool camelCase = true) public object Deserialize(Type type, string jsonString, bool camelCase = true)
{ {
return JsonSerializer.Deserialize(jsonString, type, CreateJsonSerializerOptions(camelCase)); return JsonSerializer.Deserialize(jsonString, type, CreateJsonSerializerOptions(camelCase))!;
} }
private static readonly ConcurrentDictionary<object, JsonSerializerOptions> JsonSerializerOptionsCache = private static readonly ConcurrentDictionary<object, JsonSerializerOptions> JsonSerializerOptionsCache =

2
framework/src/Volo.Abp.Json.SystemTextJson/Volo/Abp/Json/SystemTextJson/JsonConverters/AbpNullableStringToGuidConverter.cs

@ -6,7 +6,7 @@ namespace Volo.Abp.Json.SystemTextJson.JsonConverters;
public class AbpNullableStringToGuidConverter : JsonConverter<Guid?> public class AbpNullableStringToGuidConverter : JsonConverter<Guid?>
{ {
private JsonSerializerOptions _writeJsonSerializerOptions; private JsonSerializerOptions? _writeJsonSerializerOptions;
public override Guid? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) public override Guid? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{ {

2
framework/src/Volo.Abp.Json.SystemTextJson/Volo/Abp/Json/SystemTextJson/JsonConverters/AbpStringToBooleanConverter.cs

@ -8,7 +8,7 @@ namespace Volo.Abp.Json.SystemTextJson.JsonConverters;
public class AbpStringToBooleanConverter : JsonConverter<bool> public class AbpStringToBooleanConverter : JsonConverter<bool>
{ {
private JsonSerializerOptions _writeJsonSerializerOptions; private JsonSerializerOptions? _writeJsonSerializerOptions;
public override bool Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) public override bool Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{ {

10
framework/src/Volo.Abp.Json.SystemTextJson/Volo/Abp/Json/SystemTextJson/JsonConverters/AbpStringToEnumConverter.cs

@ -9,9 +9,9 @@ public class AbpStringToEnumConverter<T> : JsonConverter<T>
{ {
private readonly JsonStringEnumConverter _innerJsonStringEnumConverter; private readonly JsonStringEnumConverter _innerJsonStringEnumConverter;
private JsonSerializerOptions _readJsonSerializerOptions; private JsonSerializerOptions? _readJsonSerializerOptions;
private JsonSerializerOptions _writeJsonSerializerOptions; private JsonSerializerOptions? _writeJsonSerializerOptions;
public AbpStringToEnumConverter() public AbpStringToEnumConverter()
: this(namingPolicy: null, allowIntegerValues: true) : this(namingPolicy: null, allowIntegerValues: true)
@ -19,7 +19,7 @@ public class AbpStringToEnumConverter<T> : JsonConverter<T>
} }
public AbpStringToEnumConverter(JsonNamingPolicy namingPolicy = null, bool allowIntegerValues = true) public AbpStringToEnumConverter(JsonNamingPolicy? namingPolicy = null, bool allowIntegerValues = true)
{ {
_innerJsonStringEnumConverter = new JsonStringEnumConverter(namingPolicy, allowIntegerValues); _innerJsonStringEnumConverter = new JsonStringEnumConverter(namingPolicy, allowIntegerValues);
} }
@ -50,11 +50,11 @@ public class AbpStringToEnumConverter<T> : JsonConverter<T>
public override T ReadAsPropertyName(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) public override T ReadAsPropertyName(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{ {
return (T)Enum.Parse(typeToConvert, reader.GetString()); return (T)Enum.Parse(typeToConvert, reader.GetString()!);
} }
public override void WriteAsPropertyName(Utf8JsonWriter writer, T value, JsonSerializerOptions options) public override void WriteAsPropertyName(Utf8JsonWriter writer, T value, JsonSerializerOptions options)
{ {
writer.WritePropertyName(Enum.GetName(typeof(T), value)); writer.WritePropertyName(Enum.GetName(typeof(T), value)!);
} }
} }

6
framework/src/Volo.Abp.Json.SystemTextJson/Volo/Abp/Json/SystemTextJson/JsonConverters/AbpStringToEnumFactory.cs

@ -7,7 +7,7 @@ namespace Volo.Abp.Json.SystemTextJson.JsonConverters;
public class AbpStringToEnumFactory : JsonConverterFactory public class AbpStringToEnumFactory : JsonConverterFactory
{ {
private readonly JsonNamingPolicy _namingPolicy; private readonly JsonNamingPolicy? _namingPolicy;
private readonly bool _allowIntegerValues; private readonly bool _allowIntegerValues;
public AbpStringToEnumFactory() public AbpStringToEnumFactory()
@ -16,7 +16,7 @@ public class AbpStringToEnumFactory : JsonConverterFactory
} }
public AbpStringToEnumFactory(JsonNamingPolicy namingPolicy, bool allowIntegerValues) public AbpStringToEnumFactory(JsonNamingPolicy? namingPolicy, bool allowIntegerValues)
{ {
_namingPolicy = namingPolicy; _namingPolicy = namingPolicy;
_allowIntegerValues = allowIntegerValues; _allowIntegerValues = allowIntegerValues;
@ -33,7 +33,7 @@ public class AbpStringToEnumFactory : JsonConverterFactory
typeof(AbpStringToEnumConverter<>).MakeGenericType(typeToConvert), typeof(AbpStringToEnumConverter<>).MakeGenericType(typeToConvert),
BindingFlags.Instance | BindingFlags.Public, BindingFlags.Instance | BindingFlags.Public,
binder: null, binder: null,
new object[] { _namingPolicy, _allowIntegerValues }, new object?[] { _namingPolicy, _allowIntegerValues },
culture: null)!; culture: null)!;
} }
} }

2
framework/src/Volo.Abp.Json.SystemTextJson/Volo/Abp/Json/SystemTextJson/JsonConverters/AbpStringToGuidConverter.cs

@ -6,7 +6,7 @@ namespace Volo.Abp.Json.SystemTextJson.JsonConverters;
public class AbpStringToGuidConverter : JsonConverter<Guid> public class AbpStringToGuidConverter : JsonConverter<Guid>
{ {
private JsonSerializerOptions _writeJsonSerializerOptions; private JsonSerializerOptions? _writeJsonSerializerOptions;
public override Guid Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) public override Guid Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{ {

20
framework/src/Volo.Abp.Json.SystemTextJson/Volo/Abp/Json/SystemTextJson/JsonConverters/ObjectToInferredTypesConverter.cs

@ -12,16 +12,16 @@ public class ObjectToInferredTypesConverter : JsonConverter<object>
public override object Read( public override object Read(
ref Utf8JsonReader reader, ref Utf8JsonReader reader,
Type typeToConvert, Type typeToConvert,
JsonSerializerOptions options) => reader.TokenType switch JsonSerializerOptions options) => (reader.TokenType switch
{ {
JsonTokenType.True => true, JsonTokenType.True => true,
JsonTokenType.False => false, JsonTokenType.False => false,
JsonTokenType.Number when reader.TryGetInt64(out long l) => l, JsonTokenType.Number when reader.TryGetInt64(out long l) => l,
JsonTokenType.Number => reader.GetDouble(), JsonTokenType.Number => reader.GetDouble(),
JsonTokenType.String when reader.TryGetDateTime(out DateTime datetime) => datetime, JsonTokenType.String when reader.TryGetDateTime(out DateTime datetime) => datetime,
JsonTokenType.String => reader.GetString(), JsonTokenType.String => reader.GetString(),
_ => JsonDocument.ParseValue(ref reader).RootElement.Clone() _ => JsonDocument.ParseValue(ref reader).RootElement.Clone()
}; })!;
public override void Write( public override void Write(
Utf8JsonWriter writer, Utf8JsonWriter writer,

2
framework/src/Volo.Abp.Json.SystemTextJson/Volo/Abp/Json/SystemTextJson/Modifiers/AbpDateTimeConverterModifier.cs

@ -10,7 +10,7 @@ namespace Volo.Abp.Json.SystemTextJson.Modifiers;
public class AbpDateTimeConverterModifier public class AbpDateTimeConverterModifier
{ {
private IServiceProvider _serviceProvider; private IServiceProvider _serviceProvider = default!;
public Action<JsonTypeInfo> CreateModifyAction(IServiceProvider serviceProvider) public Action<JsonTypeInfo> CreateModifyAction(IServiceProvider serviceProvider)
{ {

2
framework/src/Volo.Abp.Json.SystemTextJson/Volo/Abp/Json/SystemTextJson/Modifiers/AbpIgnorePropertiesModifiers.cs

@ -9,7 +9,7 @@ namespace Volo.Abp.Json.SystemTextJson.Modifiers;
public class AbpIgnorePropertiesModifiers<TClass, TProperty> public class AbpIgnorePropertiesModifiers<TClass, TProperty>
where TClass : class where TClass : class
{ {
private Expression<Func<TClass, TProperty>> _propertySelector; private Expression<Func<TClass, TProperty>> _propertySelector = default!;
public Action<JsonTypeInfo> CreateModifyAction(Expression<Func<TClass, TProperty>> propertySelector) public Action<JsonTypeInfo> CreateModifyAction(Expression<Func<TClass, TProperty>> propertySelector)
{ {

2
framework/src/Volo.Abp.Json.SystemTextJson/Volo/Abp/Json/SystemTextJson/Modifiers/AbpIncludeExtraPropertiesModifiers.cs

@ -17,7 +17,7 @@ public static class AbpIncludeExtraPropertiesModifiers
.Where(x => x.AttributeProvider is MemberInfo) .Where(x => x.AttributeProvider is MemberInfo)
.FirstOrDefault(x => .FirstOrDefault(x =>
x.PropertyType == typeof(ExtraPropertyDictionary) && x.PropertyType == typeof(ExtraPropertyDictionary) &&
x.AttributeProvider.As<MemberInfo>().Name == nameof(ExtensibleObject.ExtraProperties) && x.AttributeProvider!.As<MemberInfo>().Name == nameof(ExtensibleObject.ExtraProperties) &&
x.Set == null); x.Set == null);
if (propertyJsonInfo != null) if (propertyJsonInfo != null)

2
framework/src/Volo.Abp.Json.SystemTextJson/Volo/Abp/Json/SystemTextJson/Modifiers/AbpIncludeNonPublicPropertiesModifiers.cs

@ -9,7 +9,7 @@ namespace Volo.Abp.Json.SystemTextJson.Modifiers;
public class AbpIncludeNonPublicPropertiesModifiers<TClass, TProperty> public class AbpIncludeNonPublicPropertiesModifiers<TClass, TProperty>
where TClass : class where TClass : class
{ {
private Expression<Func<TClass, TProperty>> _propertySelector; private Expression<Func<TClass, TProperty>> _propertySelector = default!;
public Action<JsonTypeInfo> CreateModifyAction(Expression<Func<TClass, TProperty>> propertySelector) public Action<JsonTypeInfo> CreateModifyAction(Expression<Func<TClass, TProperty>> propertySelector)
{ {

2
framework/src/Volo.Abp.Ldap.Abstractions/Volo.Abp.Ldap.Abstractions.csproj

@ -5,6 +5,8 @@
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>netstandard2.0;netstandard2.1;net7.0</TargetFrameworks> <TargetFrameworks>netstandard2.0;netstandard2.1;net7.0</TargetFrameworks>
<Nullable>enable</Nullable>
<WarningsAsErrors>Nullable</WarningsAsErrors>
<AssemblyName>Volo.Abp.Ldap.Abstractions</AssemblyName> <AssemblyName>Volo.Abp.Ldap.Abstractions</AssemblyName>
<PackageId>Volo.Abp.Ldap.Abstractions</PackageId> <PackageId>Volo.Abp.Ldap.Abstractions</PackageId>
<AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback> <AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback>

10
framework/src/Volo.Abp.Ldap.Abstractions/Volo/Abp/Ldap/ILdapSettingProvider.cs

@ -4,15 +4,15 @@ namespace Volo.Abp.Ldap;
public interface ILdapSettingProvider public interface ILdapSettingProvider
{ {
public Task<string> GetServerHostAsync(); public Task<string?> GetServerHostAsync();
public Task<int> GetServerPortAsync(); public Task<int> GetServerPortAsync();
public Task<string> GetBaseDcAsync(); public Task<string?> GetBaseDcAsync();
public Task<string> GetDomainAsync(); public Task<string?> GetDomainAsync();
public Task<string> GetUserNameAsync(); public Task<string?> GetUserNameAsync();
public Task<string> GetPasswordAsync(); public Task<string?> GetPasswordAsync();
} }

2
framework/src/Volo.Abp.Ldap/Volo.Abp.Ldap.csproj

@ -5,6 +5,8 @@
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>netstandard2.0;netstandard2.1;net7.0</TargetFrameworks> <TargetFrameworks>netstandard2.0;netstandard2.1;net7.0</TargetFrameworks>
<Nullable>enable</Nullable>
<WarningsAsErrors>Nullable</WarningsAsErrors>
<AssemblyName>Volo.Abp.Ldap</AssemblyName> <AssemblyName>Volo.Abp.Ldap</AssemblyName>
<PackageId>Volo.Abp.Ldap</PackageId> <PackageId>Volo.Abp.Ldap</PackageId>
<AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback> <AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback>

10
framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/LdapSettingProvider.cs

@ -14,7 +14,7 @@ public class LdapSettingProvider : ILdapSettingProvider, ITransientDependency
SettingProvider = settingProvider; SettingProvider = settingProvider;
} }
public async Task<string> GetServerHostAsync() public async Task<string?> GetServerHostAsync()
{ {
return await SettingProvider.GetOrNullAsync(LdapSettingNames.ServerHost); return await SettingProvider.GetOrNullAsync(LdapSettingNames.ServerHost);
} }
@ -24,22 +24,22 @@ public class LdapSettingProvider : ILdapSettingProvider, ITransientDependency
return (await SettingProvider.GetOrNullAsync(LdapSettingNames.ServerPort))?.To<int>() ?? default; return (await SettingProvider.GetOrNullAsync(LdapSettingNames.ServerPort))?.To<int>() ?? default;
} }
public async Task<string> GetBaseDcAsync() public async Task<string?> GetBaseDcAsync()
{ {
return await SettingProvider.GetOrNullAsync(LdapSettingNames.BaseDc); return await SettingProvider.GetOrNullAsync(LdapSettingNames.BaseDc);
} }
public async Task<string> GetDomainAsync() public async Task<string?> GetDomainAsync()
{ {
return await SettingProvider.GetOrNullAsync(LdapSettingNames.Domain); return await SettingProvider.GetOrNullAsync(LdapSettingNames.Domain);
} }
public async Task<string> GetUserNameAsync() public async Task<string?> GetUserNameAsync()
{ {
return await SettingProvider.GetOrNullAsync(LdapSettingNames.UserName); return await SettingProvider.GetOrNullAsync(LdapSettingNames.UserName);
} }
public async Task<string> GetPasswordAsync() public async Task<string?> GetPasswordAsync()
{ {
return await SettingProvider.GetOrNullAsync(LdapSettingNames.Password); return await SettingProvider.GetOrNullAsync(LdapSettingNames.Password);
} }

9
framework/src/Volo.Abp.Localization.Abstractions/Microsoft/Extensions/Localization/AbpStringLocalizerFactoryExtensions.cs

@ -6,15 +6,13 @@ namespace Microsoft.Extensions.Localization;
public static class AbpStringLocalizerFactoryExtensions public static class AbpStringLocalizerFactoryExtensions
{ {
[CanBeNull] public static IStringLocalizer? CreateDefaultOrNull(this IStringLocalizerFactory localizerFactory)
public static IStringLocalizer CreateDefaultOrNull(this IStringLocalizerFactory localizerFactory)
{ {
return (localizerFactory as IAbpStringLocalizerFactory) return (localizerFactory as IAbpStringLocalizerFactory)
?.CreateDefaultOrNull(); ?.CreateDefaultOrNull();
} }
[CanBeNull] public static IStringLocalizer? CreateByResourceNameOrNull(
public static IStringLocalizer CreateByResourceNameOrNull(
this IStringLocalizerFactory localizerFactory, this IStringLocalizerFactory localizerFactory,
string resourceName) string resourceName)
{ {
@ -36,8 +34,7 @@ public static class AbpStringLocalizerFactoryExtensions
return localizer; return localizer;
} }
[ItemCanBeNull] public static async Task<IStringLocalizer?> CreateByResourceNameOrNullAsync(
public static async Task<IStringLocalizer> CreateByResourceNameOrNullAsync(
this IStringLocalizerFactory localizerFactory, this IStringLocalizerFactory localizerFactory,
string resourceName) string resourceName)
{ {

9
framework/src/Volo.Abp.Localization.Abstractions/Microsoft/Extensions/Localization/IAbpStringLocalizerFactory.cs

@ -5,12 +5,9 @@ namespace Microsoft.Extensions.Localization;
public interface IAbpStringLocalizerFactory public interface IAbpStringLocalizerFactory
{ {
[CanBeNull] IStringLocalizer? CreateDefaultOrNull();
IStringLocalizer CreateDefaultOrNull();
[CanBeNull] IStringLocalizer? CreateByResourceNameOrNull([NotNull] string resourceName);
IStringLocalizer CreateByResourceNameOrNull([NotNull] string resourceName);
[ItemCanBeNull] Task<IStringLocalizer?> CreateByResourceNameOrNullAsync([NotNull] string resourceName);
Task<IStringLocalizer> CreateByResourceNameOrNullAsync([NotNull] string resourceName);
} }

2
framework/src/Volo.Abp.Localization.Abstractions/Volo.Abp.Localization.Abstractions.csproj

@ -5,6 +5,8 @@
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>netstandard2.0;netstandard2.1;net7.0</TargetFrameworks> <TargetFrameworks>netstandard2.0;netstandard2.1;net7.0</TargetFrameworks>
<Nullable>enable</Nullable>
<WarningsAsErrors>Nullable</WarningsAsErrors>
<AssemblyName>Volo.Abp.Localization.Abstractions</AssemblyName> <AssemblyName>Volo.Abp.Localization.Abstractions</AssemblyName>
<PackageId>Volo.Abp.Localization.Abstractions</PackageId> <PackageId>Volo.Abp.Localization.Abstractions</PackageId>
<AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback> <AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback>

2
framework/src/Volo.Abp.Localization.Abstractions/Volo/Abp/Localization/HasNameWithLocalizableDisplayNameExtensions.cs

@ -10,7 +10,7 @@ public static class HasNameWithLocalizableDisplayNameExtensions
public static string GetLocalizedDisplayName( public static string GetLocalizedDisplayName(
[NotNull] this IHasNameWithLocalizableDisplayName source, [NotNull] this IHasNameWithLocalizableDisplayName source,
[NotNull] IStringLocalizerFactory stringLocalizerFactory, [NotNull] IStringLocalizerFactory stringLocalizerFactory,
[CanBeNull] string localizationNamePrefix = "DisplayName:") string? localizationNamePrefix = "DisplayName:")
{ {
if (source.DisplayName != null) if (source.DisplayName != null)
{ {

3
framework/src/Volo.Abp.Localization.Abstractions/Volo/Abp/Localization/IHasNameWithLocalizableDisplayName.cs

@ -7,6 +7,5 @@ public interface IHasNameWithLocalizableDisplayName
[NotNull] [NotNull]
public string Name { get; } public string Name { get; }
[CanBeNull] public ILocalizableString? DisplayName { get; }
public ILocalizableString DisplayName { get; }
} }

16
framework/src/Volo.Abp.Localization.Abstractions/Volo/Abp/Localization/LocalizableString.cs

@ -7,16 +7,14 @@ namespace Volo.Abp.Localization;
public class LocalizableString : ILocalizableString, IAsyncLocalizableString public class LocalizableString : ILocalizableString, IAsyncLocalizableString
{ {
[CanBeNull] public string? ResourceName { get; }
public string ResourceName { get; }
[CanBeNull] public Type? ResourceType { get; }
public Type ResourceType { get; }
[NotNull] [NotNull]
public string Name { get; } public string Name { get; }
public LocalizableString([CanBeNull] Type resourceType, [NotNull] string name) public LocalizableString(Type? resourceType, [NotNull] string name)
{ {
Name = Check.NotNullOrEmpty(name, nameof(name)); Name = Check.NotNullOrEmpty(name, nameof(name));
ResourceType = resourceType; ResourceType = resourceType;
@ -27,7 +25,7 @@ public class LocalizableString : ILocalizableString, IAsyncLocalizableString
} }
} }
public LocalizableString([NotNull] string name, [CanBeNull] string resourceName = null) public LocalizableString([NotNull] string name, string? resourceName = null)
{ {
Name = Check.NotNullOrEmpty(name, nameof(name)); Name = Check.NotNullOrEmpty(name, nameof(name));
ResourceName = resourceName; ResourceName = resourceName;
@ -79,7 +77,7 @@ public class LocalizableString : ILocalizableString, IAsyncLocalizableString
return result; return result;
} }
private IStringLocalizer CreateStringLocalizerOrNull(IStringLocalizerFactory stringLocalizerFactory) private IStringLocalizer? CreateStringLocalizerOrNull(IStringLocalizerFactory stringLocalizerFactory)
{ {
if (ResourceType != null) if (ResourceType != null)
{ {
@ -98,7 +96,7 @@ public class LocalizableString : ILocalizableString, IAsyncLocalizableString
return stringLocalizerFactory.CreateDefaultOrNull(); return stringLocalizerFactory.CreateDefaultOrNull();
} }
private async Task<IStringLocalizer> CreateStringLocalizerOrNullAsync(IStringLocalizerFactory stringLocalizerFactory) private async Task<IStringLocalizer?> CreateStringLocalizerOrNullAsync(IStringLocalizerFactory stringLocalizerFactory)
{ {
if (ResourceType != null) if (ResourceType != null)
{ {
@ -127,7 +125,7 @@ public class LocalizableString : ILocalizableString, IAsyncLocalizableString
return new LocalizableString(resourceType, name); return new LocalizableString(resourceType, name);
} }
public static LocalizableString Create([NotNull] string name, [CanBeNull] string resourceName = null) public static LocalizableString Create([NotNull] string name, string? resourceName = null)
{ {
return new LocalizableString(name, resourceName); return new LocalizableString(name, resourceName);
} }

4
framework/src/Volo.Abp.Localization.Abstractions/Volo/Abp/Localization/LocalizationResourceNameAttribute.cs

@ -12,7 +12,7 @@ public class LocalizationResourceNameAttribute : Attribute
Name = name; Name = name;
} }
public static LocalizationResourceNameAttribute GetOrNull(Type resourceType) public static LocalizationResourceNameAttribute? GetOrNull(Type resourceType)
{ {
return resourceType return resourceType
.GetCustomAttributes(true) .GetCustomAttributes(true)
@ -22,6 +22,6 @@ public class LocalizationResourceNameAttribute : Attribute
public static string GetName(Type resourceType) public static string GetName(Type resourceType)
{ {
return GetOrNull(resourceType)?.Name ?? resourceType.FullName; return (GetOrNull(resourceType)?.Name ?? resourceType.FullName)!;
} }
} }

2
framework/src/Volo.Abp.Localization/Volo.Abp.Localization.csproj

@ -5,6 +5,8 @@
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>netstandard2.0;netstandard2.1;net7.0</TargetFrameworks> <TargetFrameworks>netstandard2.0;netstandard2.1;net7.0</TargetFrameworks>
<Nullable>enable</Nullable>
<WarningsAsErrors>Nullable</WarningsAsErrors>
<AssemblyName>Volo.Abp.Localization</AssemblyName> <AssemblyName>Volo.Abp.Localization</AssemblyName>
<PackageId>Volo.Abp.Localization</PackageId> <PackageId>Volo.Abp.Localization</PackageId>
<AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback> <AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback>

8
framework/src/Volo.Abp.Localization/Volo/Abp/Localization/AbpDictionaryBasedStringLocalizer.cs

@ -118,7 +118,7 @@ public class AbpDictionaryBasedStringLocalizer : IAbpStringLocalizer
return value; return value;
} }
protected virtual LocalizedString GetLocalizedStringOrNull( protected virtual LocalizedString? GetLocalizedStringOrNull(
string name, string name,
string cultureName, string cultureName,
bool tryDefaults = true) bool tryDefaults = true)
@ -153,7 +153,7 @@ public class AbpDictionaryBasedStringLocalizer : IAbpStringLocalizer
//Try to get from default language //Try to get from default language
if (!Resource.DefaultCultureName.IsNullOrEmpty()) if (!Resource.DefaultCultureName.IsNullOrEmpty())
{ {
var strDefault = Resource.Contributors.GetOrNull(Resource.DefaultCultureName, name); var strDefault = Resource.Contributors.GetOrNull(Resource.DefaultCultureName!, name);
if (strDefault != null) if (strDefault != null)
{ {
return strDefault; return strDefault;
@ -208,7 +208,7 @@ public class AbpDictionaryBasedStringLocalizer : IAbpStringLocalizer
//Fill all strings from default culture //Fill all strings from default culture
if (!Resource.DefaultCultureName.IsNullOrEmpty()) if (!Resource.DefaultCultureName.IsNullOrEmpty())
{ {
Resource.Contributors.Fill(Resource.DefaultCultureName, allStrings, includeDynamicContributors); Resource.Contributors.Fill(Resource.DefaultCultureName!, allStrings, includeDynamicContributors);
} }
//Overwrite all strings from the language based on country culture //Overwrite all strings from the language based on country culture
@ -268,7 +268,7 @@ public class AbpDictionaryBasedStringLocalizer : IAbpStringLocalizer
if (!Resource.DefaultCultureName.IsNullOrEmpty()) if (!Resource.DefaultCultureName.IsNullOrEmpty())
{ {
await Resource.Contributors.FillAsync( await Resource.Contributors.FillAsync(
Resource.DefaultCultureName, Resource.DefaultCultureName!,
allStrings, allStrings,
includeDynamicContributors includeDynamicContributors
); );

8
framework/src/Volo.Abp.Localization/Volo/Abp/Localization/AbpEnumLocalizer.cs

@ -19,14 +19,14 @@ public class AbpEnumLocalizer : IAbpEnumLocalizer, ITransientDependency
return GetStringInternal(enumType, enumValue, StringLocalizerFactory.CreateDefaultOrNull()); return GetStringInternal(enumType, enumValue, StringLocalizerFactory.CreateDefaultOrNull());
} }
public virtual string GetString(Type enumType, object enumValue, params IStringLocalizer[] specifyLocalizers) public virtual string GetString(Type enumType, object enumValue, params IStringLocalizer?[] specifyLocalizers)
{ {
return GetStringInternal(enumType, enumValue, specifyLocalizers); return GetStringInternal(enumType, enumValue, specifyLocalizers);
} }
protected virtual string GetStringInternal(Type enumType, object enumValue, params IStringLocalizer[] specifyLocalizers) protected virtual string GetStringInternal(Type enumType, object enumValue, params IStringLocalizer?[] specifyLocalizers)
{ {
var memberName = enumType.GetEnumName(enumValue); var memberName = enumType.GetEnumName(enumValue)!;
var localizedString = GetStringOrNull( var localizedString = GetStringOrNull(
specifyLocalizers, specifyLocalizers,
new[] new[]
@ -42,7 +42,7 @@ public class AbpEnumLocalizer : IAbpEnumLocalizer, ITransientDependency
return localizedString ?? memberName; return localizedString ?? memberName;
} }
protected virtual string GetStringOrNull(IStringLocalizer[] localizers, IEnumerable<string> keys) protected virtual string? GetStringOrNull(IStringLocalizer?[] localizers, IEnumerable<string> keys)
{ {
foreach (var key in keys) foreach (var key in keys)
{ {

2
framework/src/Volo.Abp.Localization/Volo/Abp/Localization/AbpLocalizationOptions.cs

@ -11,7 +11,7 @@ public class AbpLocalizationOptions
/// <summary> /// <summary>
/// Used as the default resource when resource was not specified on a localization operation. /// Used as the default resource when resource was not specified on a localization operation.
/// </summary> /// </summary>
public Type DefaultResourceType { get; set; } public Type? DefaultResourceType { get; set; }
public ITypeList<ILocalizationResourceContributor> GlobalContributors { get; } public ITypeList<ILocalizationResourceContributor> GlobalContributors { get; }

2
framework/src/Volo.Abp.Localization/Volo/Abp/Localization/AbpStringLocalizerExtensions.cs

@ -35,7 +35,7 @@ public static class AbpStringLocalizerExtensions
throw new AbpException($"Could not find the _localizer field inside the {typeof(StringLocalizer<>).FullName} class. Probably its name has changed. Please report this issue to the ABP framework."); throw new AbpException($"Could not find the _localizer field inside the {typeof(StringLocalizer<>).FullName} class. Probably its name has changed. Please report this issue to the ABP framework.");
} }
return localizerField.GetValue(stringLocalizer) as IStringLocalizer; return (localizerField.GetValue(stringLocalizer) as IStringLocalizer)!;
} }
public static IEnumerable<LocalizedString> GetAllStrings( public static IEnumerable<LocalizedString> GetAllStrings(

16
framework/src/Volo.Abp.Localization/Volo/Abp/Localization/AbpStringLocalizerFactory.cs

@ -52,12 +52,12 @@ public class AbpStringLocalizerFactory : IStringLocalizerFactory, IAbpStringLoca
return CreateInternal(resource.ResourceName, resource, lockCache); return CreateInternal(resource.ResourceName, resource, lockCache);
} }
public IStringLocalizer CreateByResourceNameOrNull(string resourceName) public IStringLocalizer? CreateByResourceNameOrNull(string resourceName)
{ {
return CreateByResourceNameOrNullInternal(resourceName, lockCache: true); return CreateByResourceNameOrNullInternal(resourceName, lockCache: true);
} }
private IStringLocalizer CreateByResourceNameOrNullInternal( private IStringLocalizer? CreateByResourceNameOrNullInternal(
string resourceName, string resourceName,
bool lockCache) bool lockCache)
{ {
@ -74,12 +74,12 @@ public class AbpStringLocalizerFactory : IStringLocalizerFactory, IAbpStringLoca
return CreateInternal(resourceName, resource, lockCache); return CreateInternal(resourceName, resource, lockCache);
} }
public Task<IStringLocalizer> CreateByResourceNameOrNullAsync(string resourceName) public Task<IStringLocalizer?> CreateByResourceNameOrNullAsync(string resourceName)
{ {
return CreateByResourceNameOrNullInternalAsync(resourceName, lockCache: true); return CreateByResourceNameOrNullInternalAsync(resourceName, lockCache: true);
} }
private async Task<IStringLocalizer> CreateByResourceNameOrNullInternalAsync( private async Task<IStringLocalizer?> CreateByResourceNameOrNullInternalAsync(
string resourceName, string resourceName,
bool lockCache) bool lockCache)
{ {
@ -175,7 +175,7 @@ public class AbpStringLocalizerFactory : IStringLocalizerFactory, IAbpStringLoca
{ {
resource.Contributors.Add( resource.Contributors.Add(
Activator Activator
.CreateInstance(globalContributorType) .CreateInstance(globalContributorType)!
.As<ILocalizationResourceContributor>() .As<ILocalizationResourceContributor>()
); );
} }
@ -194,7 +194,7 @@ public class AbpStringLocalizerFactory : IStringLocalizerFactory, IAbpStringLoca
.BaseResourceNames .BaseResourceNames
.Select(x => CreateByResourceNameOrNullInternal(x, lockCache: false)) .Select(x => CreateByResourceNameOrNullInternal(x, lockCache: false))
.Where(x => x != null) .Where(x => x != null)
.ToList(), .ToList()!,
AbpLocalizationOptions AbpLocalizationOptions
) )
); );
@ -206,7 +206,7 @@ public class AbpStringLocalizerFactory : IStringLocalizerFactory, IAbpStringLoca
{ {
resource.Contributors.Add( resource.Contributors.Add(
Activator Activator
.CreateInstance(globalContributorType) .CreateInstance(globalContributorType)!
.As<ILocalizationResourceContributor>() .As<ILocalizationResourceContributor>()
); );
} }
@ -259,7 +259,7 @@ public class AbpStringLocalizerFactory : IStringLocalizerFactory, IAbpStringLoca
} }
} }
public IStringLocalizer CreateDefaultOrNull() public IStringLocalizer? CreateDefaultOrNull()
{ {
if (AbpLocalizationOptions.DefaultResourceType == null) if (AbpLocalizationOptions.DefaultResourceType == null)
{ {

6
framework/src/Volo.Abp.Localization/Volo/Abp/Localization/External/IExternalLocalizationStore.cs

@ -5,11 +5,9 @@ namespace Volo.Abp.Localization.External;
public interface IExternalLocalizationStore public interface IExternalLocalizationStore
{ {
[CanBeNull] LocalizationResourceBase? GetResourceOrNull([NotNull] string resourceName);
LocalizationResourceBase GetResourceOrNull([NotNull] string resourceName);
[ItemCanBeNull] Task<LocalizationResourceBase?> GetResourceOrNullAsync([NotNull] string resourceName);
Task<LocalizationResourceBase> GetResourceOrNullAsync([NotNull] string resourceName);
Task<string[]> GetResourceNamesAsync(); Task<string[]> GetResourceNamesAsync();

6
framework/src/Volo.Abp.Localization/Volo/Abp/Localization/External/NullExternalLocalizationStore.cs

@ -6,14 +6,14 @@ namespace Volo.Abp.Localization.External;
public class NullExternalLocalizationStore : IExternalLocalizationStore, ISingletonDependency public class NullExternalLocalizationStore : IExternalLocalizationStore, ISingletonDependency
{ {
public LocalizationResourceBase GetResourceOrNull(string resourceName) public LocalizationResourceBase? GetResourceOrNull(string resourceName)
{ {
return null; return null;
} }
public Task<LocalizationResourceBase> GetResourceOrNullAsync(string resourceName) public Task<LocalizationResourceBase?> GetResourceOrNullAsync(string resourceName)
{ {
return Task.FromResult<LocalizationResourceBase>(null); return Task.FromResult<LocalizationResourceBase?>(null);
} }
public Task<string[]> GetResourceNamesAsync() public Task<string[]> GetResourceNamesAsync()

2
framework/src/Volo.Abp.Localization/Volo/Abp/Localization/ILanguageInfo.cs

@ -8,5 +8,5 @@ public interface ILanguageInfo
string DisplayName { get; } string DisplayName { get; }
string FlagIcon { get; } string? FlagIcon { get; }
} }

2
framework/src/Volo.Abp.Localization/Volo/Abp/Localization/ILocalizableStringSerializer.cs

@ -2,7 +2,7 @@
public interface ILocalizableStringSerializer public interface ILocalizableStringSerializer
{ {
string Serialize(ILocalizableString localizableString); string? Serialize(ILocalizableString localizableString);
ILocalizableString Deserialize(string value); ILocalizableString Deserialize(string value);
} }

2
framework/src/Volo.Abp.Localization/Volo/Abp/Localization/ILocalizationDictionary.cs

@ -10,7 +10,7 @@ public interface ILocalizationDictionary
{ {
string CultureName { get; } string CultureName { get; }
LocalizedString GetOrNull(string name); LocalizedString? GetOrNull(string name);
void Fill(Dictionary<string, LocalizedString> dictionary); void Fill(Dictionary<string, LocalizedString> dictionary);
} }

2
framework/src/Volo.Abp.Localization/Volo/Abp/Localization/ILocalizationResourceContributor.cs

@ -10,7 +10,7 @@ public interface ILocalizationResourceContributor
void Initialize(LocalizationResourceInitializationContext context); void Initialize(LocalizationResourceInitializationContext context);
LocalizedString GetOrNull(string cultureName, string name); LocalizedString? GetOrNull(string cultureName, string name);
void Fill(string cultureName, Dictionary<string, LocalizedString> dictionary); void Fill(string cultureName, Dictionary<string, LocalizedString> dictionary);

14
framework/src/Volo.Abp.Localization/Volo/Abp/Localization/Json/JsonLocalizationDictionaryBuilder.cs

@ -2,7 +2,6 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using System.Text.Json; using System.Text.Json;
using JetBrains.Annotations;
using Microsoft.Extensions.Localization; using Microsoft.Extensions.Localization;
namespace Volo.Abp.Localization.Json; namespace Volo.Abp.Localization.Json;
@ -13,8 +12,7 @@ public static class JsonLocalizationDictionaryBuilder
/// Builds an <see cref="JsonLocalizationDictionaryBuilder" /> from given file. /// Builds an <see cref="JsonLocalizationDictionaryBuilder" /> from given file.
/// </summary> /// </summary>
/// <param name="filePath">Path of the file</param> /// <param name="filePath">Path of the file</param>
[CanBeNull] public static ILocalizationDictionary? BuildFromFile(string filePath)
public static ILocalizationDictionary BuildFromFile(string filePath)
{ {
try try
{ {
@ -38,10 +36,9 @@ public static class JsonLocalizationDictionaryBuilder
/// Builds an <see cref="JsonLocalizationDictionaryBuilder" /> from given json string. /// Builds an <see cref="JsonLocalizationDictionaryBuilder" /> from given json string.
/// </summary> /// </summary>
/// <param name="jsonString">Json string</param> /// <param name="jsonString">Json string</param>
[CanBeNull] public static ILocalizationDictionary? BuildFromJsonString(string jsonString)
public static ILocalizationDictionary BuildFromJsonString(string jsonString)
{ {
JsonLocalizationFile jsonFile; JsonLocalizationFile? jsonFile;
try try
{ {
jsonFile = JsonSerializer.Deserialize<JsonLocalizationFile>(jsonString, DeserializeOptions); jsonFile = JsonSerializer.Deserialize<JsonLocalizationFile>(jsonString, DeserializeOptions);
@ -50,6 +47,11 @@ public static class JsonLocalizationDictionaryBuilder
{ {
throw new AbpException("Can not parse json string. " + ex.Message); throw new AbpException("Can not parse json string. " + ex.Message);
} }
if (jsonFile == null)
{
return null;
}
var cultureCode = jsonFile.Culture; var cultureCode = jsonFile.Culture;
if (string.IsNullOrEmpty(cultureCode)) if (string.IsNullOrEmpty(cultureCode))

2
framework/src/Volo.Abp.Localization/Volo/Abp/Localization/Json/JsonLocalizationFile.cs

@ -7,7 +7,7 @@ public class JsonLocalizationFile
/// <summary> /// <summary>
/// Culture name; eg : en , en-us, zh-CN /// Culture name; eg : en , en-us, zh-CN
/// </summary> /// </summary>
public string Culture { get; set; } public string Culture { get; set; } = default!;
public Dictionary<string, string> Texts { get; set; } public Dictionary<string, string> Texts { get; set; }

29
framework/src/Volo.Abp.Localization/Volo/Abp/Localization/LanguageInfo.cs

@ -8,19 +8,18 @@ namespace Volo.Abp.Localization;
public class LanguageInfo : ILanguageInfo public class LanguageInfo : ILanguageInfo
{ {
[NotNull] [NotNull]
public virtual string CultureName { get; protected set; } public virtual string CultureName { get; protected set; } = default!;
[NotNull] [NotNull]
public virtual string UiCultureName { get; protected set; } public virtual string UiCultureName { get; protected set; } = default!;
[NotNull] [NotNull]
public virtual string DisplayName { get; protected set; } public virtual string DisplayName { get; protected set; } = default!;
[NotNull] [NotNull]
public virtual string TwoLetterISOLanguageName { get; protected set; } public virtual string TwoLetterISOLanguageName { get; protected set; } = default!;
[CanBeNull] public virtual string? FlagIcon { get; set; }
public virtual string FlagIcon { get; set; }
protected LanguageInfo() protected LanguageInfo()
@ -30,30 +29,30 @@ public class LanguageInfo : ILanguageInfo
public LanguageInfo( public LanguageInfo(
string cultureName, string cultureName,
string uiCultureName = null, string? uiCultureName = null,
string displayName = null, string? displayName = null,
string flagIcon = null) string? flagIcon = null)
{ {
ChangeCultureInternal(cultureName, uiCultureName, displayName); ChangeCultureInternal(cultureName, uiCultureName, displayName);
FlagIcon = flagIcon; FlagIcon = flagIcon;
} }
public virtual void ChangeCulture(string cultureName, string uiCultureName = null, string displayName = null) public virtual void ChangeCulture(string cultureName, string? uiCultureName = null, string? displayName = null)
{ {
ChangeCultureInternal(cultureName, uiCultureName, displayName); ChangeCultureInternal(cultureName, uiCultureName, displayName);
} }
private void ChangeCultureInternal(string cultureName, string uiCultureName, string displayName) private void ChangeCultureInternal(string cultureName, string? uiCultureName, string? displayName)
{ {
CultureName = Check.NotNullOrWhiteSpace(cultureName, nameof(cultureName)); CultureName = Check.NotNullOrWhiteSpace(cultureName, nameof(cultureName));
UiCultureName = !uiCultureName.IsNullOrWhiteSpace() UiCultureName = (!uiCultureName.IsNullOrWhiteSpace()
? uiCultureName ? uiCultureName
: cultureName; : cultureName)!;
DisplayName = !displayName.IsNullOrWhiteSpace() DisplayName = (!displayName.IsNullOrWhiteSpace()
? displayName ? displayName
: cultureName; : cultureName)!;
TwoLetterISOLanguageName = new CultureInfo(cultureName) TwoLetterISOLanguageName = new CultureInfo(cultureName)
.TwoLetterISOLanguageName; .TwoLetterISOLanguageName;

4
framework/src/Volo.Abp.Localization/Volo/Abp/Localization/LanguageInfoExtensions.cs

@ -6,10 +6,10 @@ namespace Volo.Abp.Localization;
public static class LanguageInfoExtensions public static class LanguageInfoExtensions
{ {
public static T FindByCulture<T>( public static T? FindByCulture<T>(
[NotNull] this IEnumerable<T> languages, [NotNull] this IEnumerable<T> languages,
[NotNull] string cultureName, [NotNull] string cultureName,
[CanBeNull] string uiCultureName = null) string? uiCultureName = null)
where T : class, ILanguageInfo where T : class, ILanguageInfo
{ {
if (uiCultureName == null) if (uiCultureName == null)

2
framework/src/Volo.Abp.Localization/Volo/Abp/Localization/LocalizableStringSerializer.cs

@ -13,7 +13,7 @@ public class LocalizableStringSerializer : ILocalizableStringSerializer, ITransi
LocalizationOptions = localizationOptions.Value; LocalizationOptions = localizationOptions.Value;
} }
public virtual string Serialize(ILocalizableString localizableString) public virtual string? Serialize(ILocalizableString? localizableString)
{ {
if (localizableString == null) if (localizableString == null)
{ {

4
framework/src/Volo.Abp.Localization/Volo/Abp/Localization/LocalizationResource.cs

@ -12,8 +12,8 @@ public class LocalizationResource : LocalizationResourceBase
public LocalizationResource( public LocalizationResource(
[NotNull] Type resourceType, [NotNull] Type resourceType,
[CanBeNull] string defaultCultureName = null, string? defaultCultureName = null,
[CanBeNull] ILocalizationResourceContributor initialContributor = null) ILocalizationResourceContributor? initialContributor = null)
: base( : base(
LocalizationResourceNameAttribute.GetName(resourceType), LocalizationResourceNameAttribute.GetName(resourceType),
defaultCultureName, defaultCultureName,

7
framework/src/Volo.Abp.Localization/Volo/Abp/Localization/LocalizationResourceBase.cs

@ -10,16 +10,15 @@ public abstract class LocalizationResourceBase
public List<string> BaseResourceNames { get; } public List<string> BaseResourceNames { get; }
[CanBeNull] public string? DefaultCultureName { get; set; }
public string DefaultCultureName { get; set; }
[NotNull] [NotNull]
public LocalizationResourceContributorList Contributors { get; } public LocalizationResourceContributorList Contributors { get; }
public LocalizationResourceBase( public LocalizationResourceBase(
[NotNull] string resourceName, [NotNull] string resourceName,
[CanBeNull] string defaultCultureName = null, string? defaultCultureName = null,
[CanBeNull] ILocalizationResourceContributor initialContributor = null) ILocalizationResourceContributor? initialContributor = null)
{ {
ResourceName = Check.NotNullOrWhiteSpace(resourceName, nameof(resourceName)); ResourceName = Check.NotNullOrWhiteSpace(resourceName, nameof(resourceName));
DefaultCultureName = defaultCultureName; DefaultCultureName = defaultCultureName;

2
framework/src/Volo.Abp.Localization/Volo/Abp/Localization/LocalizationResourceContributorList.cs

@ -7,7 +7,7 @@ namespace Volo.Abp.Localization;
public class LocalizationResourceContributorList : List<ILocalizationResourceContributor> public class LocalizationResourceContributorList : List<ILocalizationResourceContributor>
{ {
public LocalizedString GetOrNull( public LocalizedString? GetOrNull(
string cultureName, string cultureName,
string name, string name,
bool includeDynamicContributors = true) bool includeDynamicContributors = true)

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save