-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathApplicationDependencyPackage.cs
More file actions
44 lines (41 loc) · 1.93 KB
/
ApplicationDependencyPackage.cs
File metadata and controls
44 lines (41 loc) · 1.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// =================================================================================================================================
// Copyright (c) RapidField LLC. Licensed under the MIT License. See LICENSE.txt in the project root for license information.
// =================================================================================================================================
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using RapidField.SolidInstruments.Example.DatabaseModel;
using RapidField.SolidInstruments.InversionOfControl;
using RapidField.SolidInstruments.InversionOfControl.DotNetNative;
using System.Collections.Generic;
namespace RapidField.SolidInstruments.Example.WebApplication
{
/// <summary>
/// Encapsulates container configuration for the application.
/// </summary>
public class ApplicationDependencyPackage : DotNetNativeDependencyPackage
{
/// <summary>
/// Initializes a new instance of the <see cref="ApplicationDependencyPackage" /> class.
/// </summary>
public ApplicationDependencyPackage()
: base()
{
return;
}
/// <summary>
/// Creates a new collection of dependency modules for the package.
/// </summary>
/// <param name="applicationConfiguration">
/// Configuration information for the application.
/// </param>
/// <returns>
/// The package's dependency modules.
/// </returns>
protected override IEnumerable<IDependencyModule<ServiceCollection>> CreateModules(IConfiguration applicationConfiguration) => new IDependencyModule<ServiceCollection>[]
{
new ApplicationDependencyModule(applicationConfiguration),
new ExampleDatabaseModelDependencyModule(applicationConfiguration),
new ExampleContractsDependencyModule(applicationConfiguration)
};
}
}