forked from nhibernate/nhibernate-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathList.cs
45 lines (43 loc) · 1.03 KB
/
List.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
33
34
35
36
37
38
39
40
41
42
43
44
45
using System;
using NHibernate.Type;
namespace NHibernate.Mapping
{
/// <summary>
/// A list has a primary key consisting of the key columns + index column
/// </summary>
public class List : IndexedCollection
{
/// <summary>
/// Initializes a new instance of the <see cref="List"/> class.
/// </summary>
/// <param name="owner">The <see cref="PersistentClass"/> that contains this list mapping.</param>
public List(PersistentClass owner)
: base(owner)
{
}
/// <summary>
/// Gets the appropriate <see cref="PersistentCollectionType"/> that is
/// specialized for this list mapping.
/// </summary>
public override PersistentCollectionType CollectionType
{
get
{
#if NET_2_0
// TODO: uncomment this once PersistentGenricList is actually
// implemented
//if (this.IsGeneric)
//{
// return TypeFactory.GenericList( Role, this.Element.Type.ReturnedClass );
//}
//else
//{
return TypeFactory.List( Role );
//}
#else
return TypeFactory.List( Role );
#endif
}
}
}
}