-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathIDependencyContainer.cs
More file actions
49 lines (46 loc) · 2.14 KB
/
IDependencyContainer.cs
File metadata and controls
49 lines (46 loc) · 2.14 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
46
47
48
49
// =================================================================================================================================
// Copyright (c) RapidField LLC. Licensed under the MIT License. See LICENSE.txt in the project root for license information.
// =================================================================================================================================
using RapidField.SolidInstruments.Core;
using System;
namespace RapidField.SolidInstruments.InversionOfControl
{
/// <summary>
/// Represents an abstraction for a utility that creates, destroys, and manages scoping for dependencies.
/// </summary>
public interface IDependencyContainer : IInstrument
{
/// <summary>
/// Creates a new initialization and disposal scope for the current <see cref="IDependencyContainer" />.
/// </summary>
/// <returns>
/// A new initialization and disposal scope for the current <see cref="IDependencyContainer" />.
/// </returns>
/// <exception cref="CreateDependencyScopeException">
/// An exception was raised while attempting to create the scope.
/// </exception>
/// <exception cref="ObjectDisposedException">
/// The object is disposed.
/// </exception>
public IDependencyScope CreateScope();
/// <summary>
/// Requests an object of specified type from the current <see cref="IDependencyContainer" />.
/// </summary>
/// <param name="type">
/// The type of the object to resolve.
/// </param>
/// <returns>
/// An object of specified type from the associated container.
/// </returns>
/// <exception cref="ArgumentNullException">
/// <paramref name="type" /> is <see langword="null" />.
/// </exception>
/// <exception cref="DependencyResolutionException">
/// An exception was raised while attempting to resolve the dependency.
/// </exception>
/// <exception cref="ObjectDisposedException">
/// The object is disposed.
/// </exception>
public Object Resolve(Type type);
}
}