Skip to content

Commit 1dc18e5

Browse files
committed
Namespace refactoring to use classes with the same namespace of H3.2
SVN: trunk@3057
1 parent fa9bdc7 commit 1dc18e5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+109
-152
lines changed

src/NHibernate/Action/EntityDeleteAction.cs

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
using NHibernate.Cache;
33
using NHibernate.Engine;
44
using NHibernate.Event;
5-
using NHibernate.Impl;
65
using NHibernate.Persister.Entity;
76

87
namespace NHibernate.Action

src/NHibernate/Action/EntityInsertAction.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
using System;
22
using NHibernate.Cache;
3+
using NHibernate.Cache.Entry;
34
using NHibernate.Engine;
45
using NHibernate.Event;
5-
using NHibernate.Impl;
66
using NHibernate.Persister.Entity;
77

88
namespace NHibernate.Action

src/NHibernate/Action/EntityUpdateAction.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
using System;
22
using NHibernate.Cache;
3+
using NHibernate.Cache.Entry;
34
using NHibernate.Engine;
45
using NHibernate.Event;
5-
using NHibernate.Impl;
66
using NHibernate.Persister.Entity;
77
using NHibernate.Type;
88

src/NHibernate/Impl/BatcherImpl.cs src/NHibernate/AdoNet/BatcherImpl.cs

+32-32
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
using NHibernate.SqlCommand;
1111
using NHibernate.SqlTypes;
1212

13-
namespace NHibernate.Impl
13+
namespace NHibernate.AdoNet
1414
{
1515
/// <summary>
1616
/// Manages prepared statements and batching. Class exists to enforce separation of concerns
@@ -371,7 +371,7 @@ protected void LogCommand(IDbCommand command)
371371
if (logSql.IsDebugEnabled || factory.IsShowSqlEnabled)
372372
{
373373
string outputText = GetCommandLogString(command);
374-
logSql.Debug(outputText);
374+
logSql.Debug(outputText);
375375

376376
if (factory.IsShowSqlEnabled)
377377
{
@@ -381,36 +381,36 @@ protected void LogCommand(IDbCommand command)
381381
}
382382
}
383383

384-
protected string GetCommandLogString(IDbCommand command)
385-
{
386-
string outputText;
387-
388-
if (command.Parameters.Count == 0)
389-
{
390-
outputText = command.CommandText;
391-
}
392-
else
393-
{
394-
StringBuilder output = new StringBuilder();
395-
output.Append(command.CommandText);
396-
output.Append("; ");
397-
398-
IDataParameter p;
399-
int count = command.Parameters.Count;
400-
for (int i = 0; i < count; i++)
401-
{
402-
p = (IDataParameter) command.Parameters[i];
403-
output.Append(string.Format("{0} = '{1}'", p.ParameterName, p.Value));
404-
405-
if (i + 1 < count)
406-
{
407-
output.Append(", ");
408-
}
409-
}
410-
outputText = output.ToString();
411-
}
412-
return outputText;
413-
}
384+
protected string GetCommandLogString(IDbCommand command)
385+
{
386+
string outputText;
387+
388+
if (command.Parameters.Count == 0)
389+
{
390+
outputText = command.CommandText;
391+
}
392+
else
393+
{
394+
StringBuilder output = new StringBuilder();
395+
output.Append(command.CommandText);
396+
output.Append("; ");
397+
398+
IDataParameter p;
399+
int count = command.Parameters.Count;
400+
for (int i = 0; i < count; i++)
401+
{
402+
p = (IDataParameter) command.Parameters[i];
403+
output.Append(string.Format("{0} = '{1}'", p.ParameterName, p.Value));
404+
405+
if (i + 1 < count)
406+
{
407+
output.Append(", ");
408+
}
409+
}
410+
outputText = output.ToString();
411+
}
412+
return outputText;
413+
}
414414

415415
private void LogOpenPreparedCommand()
416416
{

src/NHibernate/Impl/ConnectionManager.cs src/NHibernate/AdoNet/ConnectionManager.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
using log4net;
66
using NHibernate.Engine;
77

8-
namespace NHibernate.Impl
8+
namespace NHibernate.AdoNet
99
{
1010
/// <summary>
1111
/// Manages the database connection and transaction for an <see cref="ISession" />.

src/NHibernate/Impl/NonBatchingBatcher.cs src/NHibernate/AdoNet/NonBatchingBatcher.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
using NHibernate.AdoNet;
44
using NHibernate.Engine;
55

6-
namespace NHibernate.Impl
6+
namespace NHibernate.AdoNet
77
{
88
/// <summary>
99
/// An implementation of the <see cref="IBatcher" />

src/NHibernate/Impl/OracleDataClientBatchingBatcher.cs src/NHibernate/AdoNet/OracleDataClientBatchingBatcher.cs

+3-7
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
using System;
2+
using System.Collections;
23
using System.Data;
3-
using System.Data.SqlClient;
4-
using System.Diagnostics;
54
using System.Reflection;
6-
using System.Collections;
7-
using NHibernate.AdoNet;
8-
using NHibernate.Engine;
95

10-
namespace NHibernate.Impl
6+
namespace NHibernate.AdoNet
117
{
128
/// <summary>
139
/// Summary description for OracleDataClientBatchingBatcher.
@@ -126,4 +122,4 @@ public override int BatchSize
126122
set { batchSize = value; }
127123
}
128124
}
129-
}
125+
}

src/NHibernate/Impl/SqlClientBatchingBatcher.cs src/NHibernate/AdoNet/SqlClientBatchingBatcher.cs

+9-11
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
using System.Collections.Specialized;
21
using System.Data;
32
using System.Text;
4-
using NHibernate.AdoNet;
53

6-
namespace NHibernate.Impl
4+
namespace NHibernate.AdoNet
75
{
86
/// <summary>
97
/// Summary description for SqlClientBatchingBatcher.
@@ -13,7 +11,7 @@ internal class SqlClientBatchingBatcher : BatcherImpl
1311
private int batchSize;
1412
private int totalExpectedRowsAffected;
1513
private SqlClientSqlCommandSet currentBatch;
16-
private StringBuilder currentBatchCommandsLog = new StringBuilder();
14+
private StringBuilder currentBatchCommandsLog = new StringBuilder();
1715

1816
public SqlClientBatchingBatcher(ConnectionManager connectionManager)
1917
: base(connectionManager)
@@ -33,10 +31,10 @@ public override void AddToBatch(IExpectation expectation)
3331
totalExpectedRowsAffected += expectation.ExpectedRowCount;
3432
log.Debug("Adding to batch:");
3533
IDbCommand batchUpdate = CurrentCommand;
36-
string commandLoggedText = GetCommandLogString(batchUpdate);
37-
currentBatchCommandsLog.Append("Batch command: ").
38-
AppendLine(commandLoggedText);
39-
currentBatch.Append((System.Data.SqlClient.SqlCommand) batchUpdate);
34+
string commandLoggedText = GetCommandLogString(batchUpdate);
35+
currentBatchCommandsLog.Append("Batch command: ").
36+
AppendLine(commandLoggedText);
37+
currentBatch.Append((System.Data.SqlClient.SqlCommand) batchUpdate);
4038
if (currentBatch.CountOfCommands >= batchSize)
4139
{
4240
DoExecuteBatch(batchUpdate);
@@ -49,8 +47,8 @@ protected override void DoExecuteBatch(IDbCommand ps)
4947
CheckReaders();
5048
Prepare(currentBatch.BatchCommand);
5149

52-
logSql.Debug(currentBatchCommandsLog.ToString());
53-
currentBatchCommandsLog = new StringBuilder();
50+
logSql.Debug(currentBatchCommandsLog.ToString());
51+
currentBatchCommandsLog = new StringBuilder();
5452
int rowsAffected = currentBatch.ExecuteNonQuery();
5553

5654
Expectations.VerifyOutcomeBatched(totalExpectedRowsAffected, rowsAffected);
@@ -60,4 +58,4 @@ protected override void DoExecuteBatch(IDbCommand ps)
6058
currentBatch = new SqlClientSqlCommandSet();
6159
}
6260
}
63-
}
61+
}

src/NHibernate/Impl/SqlClientSqlCommandSet.cs src/NHibernate/AdoNet/SqlClientSqlCommandSet.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
using System.Diagnostics;
44
using System.Reflection;
55

6-
namespace NHibernate.Impl
6+
namespace NHibernate.AdoNet
77
{
88
/// <summary>
99
/// Expose the batch functionality in ADO.Net 2.0
@@ -153,4 +153,4 @@ public void Dispose()
153153

154154
#endregion
155155
}
156-
}
156+
}

src/NHibernate/Impl/CacheEntry.cs src/NHibernate/Cache/Entry/CacheEntry.cs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
using System;
2-
using NHibernate.Classic;
32
using NHibernate.Engine;
43
using NHibernate.Event;
54
using NHibernate.Persister.Entity;
65
using NHibernate.Type;
76

8-
namespace NHibernate.Impl
7+
namespace NHibernate.Cache.Entry
98
{
109
/// <summary>
1110
/// A cached instance of a persistent class

src/NHibernate/Impl/CollectionEntry.cs src/NHibernate/Cache/Entry/CollectionEntry.cs

+3-2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
using log4net;
44
using NHibernate.Collection;
55
using NHibernate.Engine;
6+
using NHibernate.Impl;
67
using NHibernate.Persister.Collection;
78

8-
namespace NHibernate.Impl
9+
namespace NHibernate.Cache.Entry
910
{
1011
/// <summary>
1112
/// We need an entry to tell us all about the current state
@@ -396,7 +397,7 @@ public void AfterAction(IPersistentCollection collection)
396397
? //|| !loadedPersister.IsMutable ?
397398
null
398399
:
399-
collection.GetSnapshot(loadedPersister); //re-snapshot
400+
collection.GetSnapshot(loadedPersister); //re-snapshot
400401
}
401402

402403
collection.PostAction();

src/NHibernate/Cache/ICacheConcurrencyStrategy.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System.Collections;
2+
using NHibernate.Cache.Entry;
23

34
namespace NHibernate.Cache
45
{
@@ -11,7 +12,7 @@ namespace NHibernate.Cache
1112
/// </para>
1213
/// <para>
1314
/// When used to cache entities and collections the key is the identifier of the
14-
/// entity/collection and the value should be set to the <see cref="Impl.CacheEntry"/>
15+
/// entity/collection and the value should be set to the <see cref="CacheEntry"/>
1516
/// for an entity and the results of <see cref="Collection.AbstractPersistentCollection.Disassemble"/>
1617
/// for a collection.
1718
/// </para>

src/NHibernate/Collection/AbstractPersistentCollection.cs

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
using log4net;
66

77
using NHibernate;
8+
using NHibernate.Cache.Entry;
89
using NHibernate.Engine;
910
using NHibernate.Impl;
1011
using NHibernate.Loader;

src/NHibernate/Driver/DriverBase.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
using System.Collections;
33
using System.Data;
44
using log4net;
5+
using NHibernate.AdoNet;
56
using NHibernate.Engine;
6-
using NHibernate.Impl;
77
using NHibernate.SqlCommand;
88
using NHibernate.SqlTypes;
99
using NHibernate.Util;

src/NHibernate/Driver/IDriver.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using System.Collections;
22
using System.Data;
3+
using NHibernate.AdoNet;
34
using NHibernate.Engine;
4-
using NHibernate.Impl;
55
using NHibernate.SqlCommand;
66
using NHibernate.SqlTypes;
77

src/NHibernate/Driver/OracleDataClientDriver.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using System;
22
using System.Data;
3+
using NHibernate.AdoNet;
34
using NHibernate.SqlTypes;
4-
using NHibernate.Impl;
55
using NHibernate.Engine;
66

77
namespace NHibernate.Driver

src/NHibernate/Driver/SqlClientDriver.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using System.Data;
22
using System.Data.SqlClient;
3+
using NHibernate.AdoNet;
34
using NHibernate.Engine;
4-
using NHibernate.Impl;
55
using NHibernate.SqlCommand;
66
using NHibernate.SqlTypes;
77

src/NHibernate/Engine/BatchFetchQueue.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using System.Collections;
22
using NHibernate.Cache;
3+
using NHibernate.Cache.Entry;
34
using NHibernate.Collection;
4-
using NHibernate.Impl;
55
using NHibernate.Persister.Collection;
66
using NHibernate.Persister.Entity;
77
using NHibernate.Util;

src/NHibernate/Engine/Cascades.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
using System;
22
using System.Collections;
33
using log4net;
4+
using NHibernate.Cache.Entry;
45
using NHibernate.Collection;
56
using NHibernate.Event;
6-
using NHibernate.Impl;
77
using NHibernate.Persister.Collection;
88
using NHibernate.Persister.Entity;
99
using NHibernate.Type;

src/NHibernate/Impl/CollectionKey.cs src/NHibernate/Engine/CollectionKey.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
using NHibernate.Persister.Collection;
44
using NHibernate.Type;
55

6-
namespace NHibernate.Impl
6+
namespace NHibernate.Engine
77
{
88
[Serializable]
99
public sealed class CollectionKey

src/NHibernate/Engine/Collections.cs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using log4net;
2+
using NHibernate.Cache.Entry;
23
using NHibernate.Collection;
34
using NHibernate.Impl;
45
using NHibernate.Persister.Collection;

0 commit comments

Comments
 (0)