-
Notifications
You must be signed in to change notification settings - Fork 222
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #111 from aspnetboilerplate/upgrade-to-abp-10.0-an…
…d-dotnet-9 Upgrade to ABP 10.0 and .NET 9
- Loading branch information
Showing
71 changed files
with
2,957 additions
and
1,306 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 8 additions & 9 deletions
17
src/AbpCompanyName.AbpProjectName.Application/AbpProjectNameAppServiceBase.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,14 @@ | ||
using Abp.Application.Services; | ||
|
||
namespace AbpCompanyName.AbpProjectName | ||
namespace AbpCompanyName.AbpProjectName; | ||
|
||
/// <summary> | ||
/// Derive your application services from this class. | ||
/// </summary> | ||
public abstract class AbpProjectNameAppServiceBase : ApplicationService | ||
{ | ||
/// <summary> | ||
/// Derive your application services from this class. | ||
/// </summary> | ||
public abstract class AbpProjectNameAppServiceBase : ApplicationService | ||
protected AbpProjectNameAppServiceBase() | ||
{ | ||
protected AbpProjectNameAppServiceBase() | ||
{ | ||
LocalizationSourceName = AbpProjectNameConsts.LocalizationSourceName; | ||
} | ||
LocalizationSourceName = AbpProjectNameConsts.LocalizationSourceName; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
src/AbpCompanyName.AbpProjectName.Application/Properties/AssemblyInfo.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 10 additions & 11 deletions
21
src/AbpCompanyName.AbpProjectName.Core/AbpProjectNameConsts.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,13 @@ | ||
namespace AbpCompanyName.AbpProjectName | ||
namespace AbpCompanyName.AbpProjectName; | ||
|
||
public class AbpProjectNameConsts | ||
{ | ||
public class AbpProjectNameConsts | ||
{ | ||
public const string LocalizationSourceName = "AbpProjectName"; | ||
public const string LocalizationSourceName = "AbpProjectName"; | ||
|
||
public const string ConnectionStringName = "Default"; | ||
|
||
public const string ConnectionStringName = "Default"; | ||
|
||
/// <summary> | ||
/// Default pass phrase for SimpleStringCipher decrypt/encrypt operations | ||
/// </summary> | ||
public const string DefaultPassPhrase = "{{DEFAULT_PASS_PHRASE_HERE}}"; | ||
} | ||
/// <summary> | ||
/// Default pass phrase for SimpleStringCipher decrypt/encrypt operations | ||
/// </summary> | ||
public const string DefaultPassPhrase = "{{DEFAULT_PASS_PHRASE_HERE}}"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 29 additions & 30 deletions
59
src/AbpCompanyName.AbpProjectName.Core/Configuration/AppConfigurations.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,40 @@ | ||
using System.Collections.Concurrent; | ||
using Abp.Extensions; | ||
using Abp.Extensions; | ||
using Microsoft.Extensions.Configuration; | ||
using System.Collections.Concurrent; | ||
|
||
namespace AbpCompanyName.AbpProjectName.Configuration | ||
namespace AbpCompanyName.AbpProjectName.Configuration; | ||
|
||
public static class AppConfigurations | ||
{ | ||
public static class AppConfigurations | ||
private static readonly ConcurrentDictionary<string, IConfigurationRoot> ConfigurationCache; | ||
|
||
static AppConfigurations() | ||
{ | ||
private static readonly ConcurrentDictionary<string, IConfigurationRoot> ConfigurationCache; | ||
ConfigurationCache = new ConcurrentDictionary<string, IConfigurationRoot>(); | ||
} | ||
|
||
static AppConfigurations() | ||
{ | ||
ConfigurationCache = new ConcurrentDictionary<string, IConfigurationRoot>(); | ||
} | ||
public static IConfigurationRoot Get(string path, string environmentName = null) | ||
{ | ||
var cacheKey = path + "#" + environmentName; | ||
return ConfigurationCache.GetOrAdd( | ||
cacheKey, | ||
_ => BuildConfiguration(path, environmentName) | ||
); | ||
} | ||
|
||
public static IConfigurationRoot Get(string path, string environmentName = null) | ||
{ | ||
var cacheKey = path + "#" + environmentName; | ||
return ConfigurationCache.GetOrAdd( | ||
cacheKey, | ||
_ => BuildConfiguration(path, environmentName) | ||
); | ||
} | ||
private static IConfigurationRoot BuildConfiguration(string path, string environmentName = null) | ||
{ | ||
var builder = new ConfigurationBuilder() | ||
.SetBasePath(path) | ||
.AddJsonFile("appsettings.json", optional: true, reloadOnChange: true); | ||
|
||
private static IConfigurationRoot BuildConfiguration(string path, string environmentName = null) | ||
if (!environmentName.IsNullOrWhiteSpace()) | ||
{ | ||
var builder = new ConfigurationBuilder() | ||
.SetBasePath(path) | ||
.AddJsonFile("appsettings.json", optional: true, reloadOnChange: true); | ||
|
||
if (!environmentName.IsNullOrWhiteSpace()) | ||
{ | ||
builder = builder.AddJsonFile($"appsettings.{environmentName}.json", optional: true); | ||
} | ||
|
||
builder = builder.AddEnvironmentVariables(); | ||
|
||
return builder.Build(); | ||
builder = builder.AddJsonFile($"appsettings.{environmentName}.json", optional: true); | ||
} | ||
|
||
builder = builder.AddEnvironmentVariables(); | ||
|
||
return builder.Build(); | ||
} | ||
} |
30 changes: 14 additions & 16 deletions
30
src/AbpCompanyName.AbpProjectName.Core/Localization/AbpProjectNameLocalizationConfigurer.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,25 @@ | ||
using System.Reflection; | ||
using Abp.Configuration.Startup; | ||
using Abp.Configuration.Startup; | ||
using Abp.Localization; | ||
using Abp.Localization.Dictionaries; | ||
using Abp.Localization.Dictionaries.Json; | ||
using Abp.Reflection.Extensions; | ||
|
||
namespace AbpCompanyName.AbpProjectName.Localization | ||
namespace AbpCompanyName.AbpProjectName.Localization; | ||
|
||
public static class AbpProjectNameLocalizationConfigurer | ||
{ | ||
public static class AbpProjectNameLocalizationConfigurer | ||
public static void Configure(ILocalizationConfiguration localizationConfiguration) | ||
{ | ||
public static void Configure(ILocalizationConfiguration localizationConfiguration) | ||
{ | ||
localizationConfiguration.Languages.Add(new LanguageInfo("en", "English", "famfamfam-flags england", isDefault: true)); | ||
localizationConfiguration.Languages.Add(new LanguageInfo("tr", "Türkçe", "famfamfam-flags tr")); | ||
localizationConfiguration.Languages.Add(new LanguageInfo("en", "English", "famfamfam-flags england", isDefault: true)); | ||
localizationConfiguration.Languages.Add(new LanguageInfo("tr", "Türkçe", "famfamfam-flags tr")); | ||
|
||
localizationConfiguration.Sources.Add( | ||
new DictionaryBasedLocalizationSource(AbpProjectNameConsts.LocalizationSourceName, | ||
new JsonEmbeddedFileLocalizationDictionaryProvider( | ||
typeof(AbpProjectNameLocalizationConfigurer).GetAssembly(), | ||
"AbpCompanyName.AbpProjectName.Localization.SourceFiles" | ||
) | ||
localizationConfiguration.Sources.Add( | ||
new DictionaryBasedLocalizationSource(AbpProjectNameConsts.LocalizationSourceName, | ||
new JsonEmbeddedFileLocalizationDictionaryProvider( | ||
typeof(AbpProjectNameLocalizationConfigurer).GetAssembly(), | ||
"AbpCompanyName.AbpProjectName.Localization.SourceFiles" | ||
) | ||
); | ||
} | ||
) | ||
); | ||
} | ||
} |
1 change: 0 additions & 1 deletion
1
src/AbpCompanyName.AbpProjectName.Core/Properties/AssemblyInfo.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.