Skip to content

Commit acff8e1

Browse files
ngbrownhazzik
authored andcommitted
NH-3807 - Replace use of System.Collections.Queue with System.Collections.Generic.Queue<>.
System.Collections.Queue has been removed from CoreClr.
1 parent 2f90d5c commit acff8e1

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

src/NHibernate/Cfg/MappingsQueue.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
using System.Collections;
21
using System.Collections.Generic;
32
using System.Linq;
43
using System.Text;
@@ -10,7 +9,7 @@ namespace NHibernate.Cfg
109
/// </summary>
1110
public class MappingsQueue
1211
{
13-
private readonly Queue availableEntries = new Queue();
12+
private readonly Queue<MappingsQueueEntry> availableEntries = new Queue<MappingsQueueEntry>();
1413
private readonly ISet<string> processedClassNames = new HashSet<string>();
1514

1615
private readonly List<MappingsQueueEntry> unavailableEntries = new List<MappingsQueueEntry>();
@@ -109,4 +108,4 @@ private static string FormatExceptionMessage(IEnumerable<MappingsQueueEntry> res
109108
return message.ToString();
110109
}
111110
}
112-
}
111+
}

src/NHibernate/Dialect/BitwiseFunctionOperation.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System;
22
using System.Collections;
3+
using System.Collections.Generic;
34
using NHibernate.Dialect.Function;
45
using NHibernate.Engine;
56
using NHibernate.SqlCommand;
@@ -15,7 +16,7 @@ public class BitwiseFunctionOperation : ISQLFunction
1516
{
1617
private readonly string _functionName;
1718
private SqlStringBuilder _sqlBuffer;
18-
private Queue _args;
19+
private Queue<object> _args;
1920

2021
/// <summary>
2122
/// Creates an instance of this class using the provided function name
@@ -62,7 +63,7 @@ public SqlString Render(IList args, ISessionFactoryImplementor factory)
6263
private void Prepare(IList args)
6364
{
6465
_sqlBuffer = new SqlStringBuilder();
65-
_args = new Queue();
66+
_args = new Queue<object>();
6667
foreach (var arg in args)
6768
{
6869
if (!IsParens(arg.ToString()))

src/NHibernate/Dialect/BitwiseNativeOperation.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
using System;
22
using System.Collections;
3+
using System.Collections.Generic;
4+
using System.Linq;
35
using NHibernate.Dialect.Function;
46
using NHibernate.Engine;
57
using NHibernate.SqlCommand;
@@ -15,7 +17,7 @@ public class BitwiseNativeOperation : ISQLFunction
1517
{
1618
private readonly string _sqlOpToken;
1719
private readonly bool _isNot;
18-
private Queue _args;
20+
private Queue<object> _args;
1921
private SqlStringBuilder _sqlBuffer;
2022

2123
/// <summary>
@@ -76,7 +78,7 @@ public SqlString Render(IList args, ISessionFactoryImplementor factory)
7678
private void Prepare(IList args)
7779
{
7880
_sqlBuffer = new SqlStringBuilder();
79-
_args = new Queue(args);
81+
_args = new Queue<object>(args.Cast<object>());
8082
}
8183

8284
private void AddFirstArgument()

0 commit comments

Comments
 (0)