Skip to content

Commit fed0e97

Browse files
committed
Add ServiceConfigurationContext.Configuration property
1 parent 7d3e5ce commit fed0e97

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

framework/src/Volo.Abp.Core/Volo/Abp/Modularity/ServiceConfigurationContext.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System.Collections.Generic;
22
using JetBrains.Annotations;
3+
using Microsoft.Extensions.Configuration;
34
using Microsoft.Extensions.DependencyInjection;
45

56
namespace Volo.Abp.Modularity;
@@ -8,6 +9,13 @@ public class ServiceConfigurationContext
89
{
910
public IServiceCollection Services { get; }
1011

12+
public IConfiguration Configuration {
13+
get {
14+
return _configuration ??= Services.GetConfiguration();
15+
}
16+
}
17+
private IConfiguration? _configuration;
18+
1119
public IDictionary<string, object?> Items { get; }
1220

1321
/// <summary>
@@ -29,4 +37,4 @@ public ServiceConfigurationContext([NotNull] IServiceCollection services)
2937
Services = Check.NotNull(services, nameof(services));
3038
Items = new Dictionary<string, object?>();
3139
}
32-
}
40+
}

0 commit comments

Comments
 (0)