-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathIObjectContainerConfigurationDefinitions.cs
More file actions
43 lines (40 loc) · 2 KB
/
IObjectContainerConfigurationDefinitions.cs
File metadata and controls
43 lines (40 loc) · 2 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
// =================================================================================================================================
// Copyright (c) RapidField LLC. Licensed under the MIT License. See LICENSE.txt in the project root for license information.
// =================================================================================================================================
using System;
namespace RapidField.SolidInstruments.ObjectComposition
{
/// <summary>
/// Represents a collection of definitions that control the behavior of an <see cref="ObjectContainer" /> when resolving
/// requested objects.
/// </summary>
public interface IObjectContainerConfigurationDefinitions
{
/// <summary>
/// Registers the specified product type with the associated <see cref="IObjectContainer" />.
/// </summary>
/// <typeparam name="TRequest">
/// The request type that identifies the registration.
/// </typeparam>
/// <typeparam name="TProduct">
/// The type that is produced by the container as a result of a request for <typeparamref name="TRequest" />.
/// </typeparam>
/// <exception cref="ArgumentException">
/// A definition already exists for <typeparamref name="TRequest" />.
/// </exception>
public IObjectContainerConfigurationDefinitions Add<TRequest, TProduct>()
where TRequest : class
where TProduct : class, TRequest;
/// <summary>
/// Registers the specified product type with the associated <see cref="IObjectContainer" />.
/// </summary>
/// <typeparam name="TProduct">
/// The type that is registered for production by the container.
/// </typeparam>
/// <exception cref="ArgumentException">
/// A definition already exists for <typeparamref name="TProduct" />.
/// </exception>
public IObjectContainerConfigurationDefinitions Add<TProduct>()
where TProduct : class;
}
}