File tree Expand file tree Collapse file tree 24 files changed +93
-110
lines changed Expand file tree Collapse file tree 24 files changed +93
-110
lines changed Original file line number Diff line number Diff line change 1
1
using System ;
2
- using System . Collections ;
3
2
using System . Collections . Generic ;
4
3
5
4
namespace NHibernate . DomainModel
@@ -9,7 +8,7 @@ public class Lower : Top
9
8
private int _intprop ;
10
9
private string _foo ;
11
10
private ISet < Top > _set ;
12
- private IList _bag ;
11
+ private IList < Top > _bag ;
13
12
private Lower _other ;
14
13
private Top _another ;
15
14
private Lower _yetAnother ;
@@ -33,7 +32,7 @@ public ISet<Top> Set
33
32
set { _set = value ; }
34
33
}
35
34
36
- public IList Bag
35
+ public IList < Top > Bag
37
36
{
38
37
get { return _bag ; }
39
38
set { _bag = value ; }
Original file line number Diff line number Diff line change 1
1
using System ;
2
- using System . Collections ;
3
-
2
+ using System . Collections . Generic ;
3
+
4
4
namespace NHibernate . DomainModel . NHSpecific
5
5
{
6
6
/// <summary>
@@ -10,7 +10,7 @@ public class Optimistic
10
10
{
11
11
private int _id ;
12
12
private string _string ;
13
- private IList _bag ;
13
+ private IList < string > _bag ;
14
14
15
15
public int Id
16
16
{
@@ -24,7 +24,7 @@ public string String
24
24
set { _string = value ; }
25
25
}
26
26
27
- public IList Bag
27
+ public IList < string > Bag
28
28
{
29
29
get { return _bag ; }
30
30
set { _bag = value ; }
Original file line number Diff line number Diff line change 1
1
using System ;
2
- using System . Collections ;
3
2
using System . Collections . Generic ;
4
3
5
4
namespace NHibernate . DomainModel
@@ -10,7 +9,7 @@ public class Po
10
9
private string _value ;
11
10
private ISet < Multi > _set ;
12
11
private ISet < object > _eagerSet ;
13
- private IList _list ;
12
+ private IList < SubMulti > _list ;
14
13
private Top _top ;
15
14
private Lower _lower ;
16
15
@@ -33,7 +32,7 @@ public ISet<Multi> Set
33
32
set { _set = value ; }
34
33
}
35
34
36
- public IList List
35
+ public IList < SubMulti > List
37
36
{
38
37
get { return _list ; }
39
38
set { _list = value ; }
Original file line number Diff line number Diff line change 1
1
using System ;
2
- using System . Collections ;
3
-
2
+ using System . Collections . Generic ;
3
+
4
4
namespace NHibernate . DomainModel
5
5
{
6
6
public class SubMulti : Multi
7
7
{
8
8
private float _amount ;
9
9
private SubMulti _parent ;
10
- private IList _children ;
11
- private IList _moreChildren ;
10
+ private IList < SubMulti > _children ;
11
+ private IList < SubMulti > _moreChildren ;
12
12
13
13
public float Amount
14
14
{
@@ -22,13 +22,13 @@ public SubMulti Parent
22
22
set { _parent = value ; }
23
23
}
24
24
25
- public IList Children
25
+ public IList < SubMulti > Children
26
26
{
27
27
get { return _children ; }
28
28
set { _children = value ; }
29
29
}
30
30
31
- public IList MoreChildren
31
+ public IList < SubMulti > MoreChildren
32
32
{
33
33
get { return _moreChildren ; }
34
34
set { _moreChildren = value ; }
Original file line number Diff line number Diff line change 1
1
using System ;
2
- using System . Collections ;
2
+ using System . Collections . Generic ;
3
3
4
4
namespace NHibernate . Test . CompositeId
5
5
{
@@ -46,7 +46,7 @@ public override int GetHashCode()
46
46
private ID id = new ID ( ) ;
47
47
private DateTime orderDate ;
48
48
private Customer customer ;
49
- private IList lineItems = new ArrayList ( ) ;
49
+ private IList < LineItem > lineItems = new List < LineItem > ( ) ;
50
50
private decimal total ;
51
51
52
52
public Order ( ) { }
@@ -76,7 +76,7 @@ public virtual Customer Customer
76
76
set { customer = value ; }
77
77
}
78
78
79
- public virtual IList LineItems
79
+ public virtual IList < LineItem > LineItems
80
80
{
81
81
get { return lineItems ; }
82
82
set { lineItems = value ; }
Original file line number Diff line number Diff line change 1
1
using System ;
2
- using System . Collections ;
2
+ using System . Collections . Generic ;
3
3
4
4
namespace NHibernate . Test . FilterTest
5
5
{
@@ -11,7 +11,7 @@ public class Order
11
11
private DateTime fulfillmentDate ;
12
12
private Salesperson salesperson ;
13
13
private String buyer ;
14
- private IList lineItems = new ArrayList ( ) ;
14
+ private IList < LineItem > lineItems = new List < LineItem > ( ) ;
15
15
16
16
public virtual long Id
17
17
{
@@ -49,7 +49,7 @@ public virtual string Buyer
49
49
set { buyer = value ; }
50
50
}
51
51
52
- public virtual IList LineItems
52
+ public virtual IList < LineItem > LineItems
53
53
{
54
54
get { return lineItems ; }
55
55
set { lineItems = value ; }
Original file line number Diff line number Diff line change @@ -68,15 +68,9 @@ public void SubclassCollection()
68
68
SubMulti sm = new SubMulti ( ) ;
69
69
SubMulti sm1 = new SubMulti ( ) ;
70
70
SubMulti sm2 = new SubMulti ( ) ;
71
- IList list = new ArrayList ( ) ;
72
- IList anotherList = new ArrayList ( ) ;
73
- sm . Children = list ;
74
- sm . MoreChildren = anotherList ;
71
+ sm . Children = new List < SubMulti > { sm1 , sm2 } ;
72
+ sm . MoreChildren = new List < SubMulti > { sm1 , sm2 } ;
75
73
sm . ExtraProp = "foo" ;
76
- list . Add ( sm1 ) ;
77
- list . Add ( sm2 ) ;
78
- anotherList . Add ( sm1 ) ;
79
- anotherList . Add ( sm2 ) ;
80
74
sm1 . Parent = sm ;
81
75
sm2 . Parent = sm ;
82
76
object id = s . Save ( sm ) ;
@@ -619,8 +613,7 @@ public void Collection()
619
613
multi1 . Po = po ;
620
614
multi2 . Po = po ;
621
615
po . Set = new HashSet < Multi > { multi1 , multi2 } ;
622
- po . List = new ArrayList ( ) ;
623
- po . List . Add ( new SubMulti ( ) ) ;
616
+ po . List = new List < SubMulti > { new SubMulti ( ) } ;
624
617
object id = s . Save ( po ) ;
625
618
Assert . IsNotNull ( id ) ;
626
619
t . Commit ( ) ;
@@ -661,7 +654,7 @@ public void CollectionPointer()
661
654
{
662
655
ISession s = OpenSession ( ) ;
663
656
Lower ls = new Lower ( ) ;
664
- IList list = new ArrayList ( ) ;
657
+ IList < Top > list = new List < Top > ( ) ;
665
658
ls . Bag = list ;
666
659
Top simple = new Top ( ) ;
667
660
object id = s . Save ( ls ) ;
Original file line number Diff line number Diff line change 1
- using System . Collections ;
1
+ using System . Collections . Generic ;
2
2
3
3
namespace NHibernate . Test . NHSpecificTest . NH1359
4
4
{
@@ -7,20 +7,20 @@ public class Person
7
7
private int id ;
8
8
private int iq ;
9
9
private string name ;
10
- private IList pets ;
10
+ private IList < Pet > pets ;
11
11
private int shoeSize ;
12
12
13
13
public Person ( )
14
14
{
15
- Pets = new ArrayList ( ) ;
15
+ Pets = new List < Pet > ( ) ;
16
16
}
17
17
18
18
public Person ( string name , int iq , int shoeSize )
19
19
{
20
20
this . name = name ;
21
21
this . iq = iq ;
22
22
this . shoeSize = shoeSize ;
23
- Pets = new ArrayList ( ) ;
23
+ Pets = new List < Pet > ( ) ;
24
24
}
25
25
26
26
public virtual int Id
@@ -47,7 +47,7 @@ public virtual int ShoeSize
47
47
set { shoeSize = value ; }
48
48
}
49
49
50
- public virtual IList Pets
50
+ public virtual IList < Pet > Pets
51
51
{
52
52
get { return pets ; }
53
53
protected set { pets = value ; }
Original file line number Diff line number Diff line change 1
- using System . Collections ;
1
+ using System . Collections . Generic ;
2
2
3
3
namespace NHibernate . Test . NHSpecificTest . NH1393
4
4
{
@@ -7,20 +7,20 @@ public class Person
7
7
private int id ;
8
8
private int iq ;
9
9
private string name ;
10
- private IList pets ;
10
+ private IList < Pet > pets ;
11
11
private int shoeSize ;
12
12
13
13
public Person ( )
14
14
{
15
- pets = new ArrayList ( ) ;
15
+ pets = new List < Pet > ( ) ;
16
16
}
17
17
18
18
public Person ( string name , int iq , int shoeSize )
19
19
{
20
20
this . name = name ;
21
21
this . iq = iq ;
22
22
this . shoeSize = shoeSize ;
23
- pets = new ArrayList ( ) ;
23
+ pets = new List < Pet > ( ) ;
24
24
}
25
25
26
26
public virtual int Id
@@ -47,7 +47,7 @@ public virtual int ShoeSize
47
47
set { shoeSize = value ; }
48
48
}
49
49
50
- public virtual IList Pets
50
+ public virtual IList < Pet > Pets
51
51
{
52
52
get { return pets ; }
53
53
protected set { pets = value ; }
Original file line number Diff line number Diff line change 1
- using System . Collections ;
1
+ using System . Collections . Generic ;
2
2
3
3
namespace NHibernate . Test . NHSpecificTest . NH1394
4
4
{
@@ -7,20 +7,20 @@ public class Person
7
7
private int id ;
8
8
private int iq ;
9
9
private string name ;
10
- private IList pets ;
10
+ private IList < Pet > pets ;
11
11
private int shoeSize ;
12
12
13
13
public Person ( )
14
14
{
15
- pets = new ArrayList ( ) ;
15
+ pets = new List < Pet > ( ) ;
16
16
}
17
17
18
18
public Person ( string name , int iq , int shoeSize )
19
19
{
20
20
this . name = name ;
21
21
this . iq = iq ;
22
22
this . shoeSize = shoeSize ;
23
- pets = new ArrayList ( ) ;
23
+ pets = new List < Pet > ( ) ;
24
24
}
25
25
26
26
public virtual int Id
@@ -47,7 +47,7 @@ public virtual int ShoeSize
47
47
set { shoeSize = value ; }
48
48
}
49
49
50
- public virtual IList Pets
50
+ public virtual IList < Pet > Pets
51
51
{
52
52
get { return pets ; }
53
53
protected set { pets = value ; }
You can’t perform that action at this time.
0 commit comments