|
|
@ -1,4 +1,5 @@ |
|
|
using JetBrains.Annotations; |
|
|
using System.Collections.Generic; |
|
|
|
|
|
using JetBrains.Annotations; |
|
|
using Microsoft.Extensions.DependencyInjection; |
|
|
using Microsoft.Extensions.DependencyInjection; |
|
|
|
|
|
|
|
|
namespace Volo.Abp.Modularity |
|
|
namespace Volo.Abp.Modularity |
|
|
@ -7,9 +8,27 @@ namespace Volo.Abp.Modularity |
|
|
{ |
|
|
{ |
|
|
public IServiceCollection Services { get; } |
|
|
public IServiceCollection Services { get; } |
|
|
|
|
|
|
|
|
|
|
|
public IDictionary<string, object> Items { get; } |
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Gets/sets arbitrary named objects those can be stored during
|
|
|
|
|
|
/// the service registration phase and shared between modules.
|
|
|
|
|
|
///
|
|
|
|
|
|
/// This is a shortcut usage of the <see cref="Items"/> dictionary.
|
|
|
|
|
|
/// Returns null if given key is not found in the <see cref="Items"/> dictionary.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="key"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
public object this[string key] |
|
|
|
|
|
{ |
|
|
|
|
|
get => Items.GetOrDefault(key); |
|
|
|
|
|
set => Items[key] = value; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
public ServiceConfigurationContext([NotNull] IServiceCollection services) |
|
|
public ServiceConfigurationContext([NotNull] IServiceCollection services) |
|
|
{ |
|
|
{ |
|
|
Services = Check.NotNull(services, nameof(services)); |
|
|
Services = Check.NotNull(services, nameof(services)); |
|
|
|
|
|
Items = new Dictionary<string, object>(); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |