forked from nhibernate/nhibernate-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIObjectsFactory.cs
32 lines (30 loc) · 1.21 KB
/
IObjectsFactory.cs
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
namespace NHibernate.Bytecode
{
/// <summary>
/// Interface for instantiate all NHibernate objects.
/// </summary>
public interface IObjectsFactory
{
/// <summary>
/// Creates an instance of the specified type.
/// </summary>
/// <param name="type">The type of object to create.</param>
/// <returns>A reference to the created object.</returns>
object CreateInstance(System.Type type);
/// <summary>
/// Creates an instance of the specified type.
/// </summary>
/// <param name="type">The type of object to create.</param>
/// <param name="nonPublic">true if a public or nonpublic default constructor can match; false if only a public default constructor can match.</param>
/// <returns>A reference to the created object.</returns>
object CreateInstance(System.Type type, bool nonPublic);
/// <summary>
/// Creates an instance of the specified type using the constructor
/// that best matches the specified parameters.
/// </summary>
/// <param name="type">The type of object to create.</param>
/// <param name="ctorArgs">An array of constructor arguments.</param>
/// <returns>A reference to the created object.</returns>
object CreateInstance(System.Type type, params object[] ctorArgs);
}
}