-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDotNetNativeDependencyPackage.cs
More file actions
45 lines (42 loc) · 2.26 KB
/
DotNetNativeDependencyPackage.cs
File metadata and controls
45 lines (42 loc) · 2.26 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
45
// =================================================================================================================================
// 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 System;
namespace RapidField.SolidInstruments.InversionOfControl.DotNetNative
{
/// <summary>
/// Encapsulates native .NET container configuration for an application.
/// </summary>
public abstract class DotNetNativeDependencyPackage : DependencyPackage<ServiceCollection, DotNetNativeDependencyEngine>
{
/// <summary>
/// Initializes a new instance of the <see cref="DotNetNativeDependencyPackage" /> class.
/// </summary>
protected DotNetNativeDependencyPackage()
{
return;
}
/// <summary>
/// Creates a new dependency engine that is configured by the current <see cref="DotNetNativeDependencyPackage" />.
/// </summary>
/// <param name="applicationConfiguration">
/// Configuration information for the application.
/// </param>
/// <param name="serviceDescriptors">
/// A collection of service descriptors to which the engine will supply dependencies.
/// </param>
/// <param name="package">
/// The current dependency package.
/// </param>
/// <returns>
/// The resulting dependency engine.
/// </returns>
/// <exception cref="ArgumentNullException">
/// <paramref name="applicationConfiguration" /> is <see langword="null" /> -or- <paramref name="package" /> is
/// <see langword="null" /> -or- <paramref name="serviceDescriptors" /> is <see langword="null" /> .
/// </exception>
protected sealed override DotNetNativeDependencyEngine CreateEngine(IConfiguration applicationConfiguration, IServiceCollection serviceDescriptors, IDependencyPackage<ServiceCollection> package) => new DotNetNativeDependencyEngine(applicationConfiguration, package, serviceDescriptors);
}
}