Skip to content

Commit 90873fb

Browse files
committed
Really fix formatting.
1 parent 6d402f7 commit 90873fb

File tree

1 file changed

+29
-29
lines changed

1 file changed

+29
-29
lines changed

src/NHibernate/AdoNet/ColumnNameCache.cs

+29-29
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ namespace NHibernate.AdoNet
66
/// <summary> Implementation of ColumnNameCache. </summary>
77
public class ColumnNameCache
88
{
9-
private readonly ReaderWriterLockSlim cacheLock = new ReaderWriterLockSlim();
9+
private readonly ReaderWriterLockSlim cacheLock = new ReaderWriterLockSlim();
1010
private readonly Dictionary<string, int?> columnNameToIndexCache;
1111

1212
public ColumnNameCache(int columnCount)
@@ -17,45 +17,45 @@ public ColumnNameCache(int columnCount)
1717

1818
public int GetIndexForColumnName(string columnName, ResultSetWrapper rs)
1919
{
20-
int? cached = Read(columnName);
20+
int? cached = Read(columnName);
2121
if (cached.HasValue)
2222
{
2323
return cached.Value;
2424
}
2525
else
2626
{
2727
int index = rs.Target.GetOrdinal(columnName);
28-
Insert(columnName, index);
28+
Insert(columnName, index);
2929
return index;
3030
}
3131
}
3232

33-
private int? Read(string key)
34-
{
35-
cacheLock.EnterReadLock();
36-
try
37-
{
38-
int? value;
39-
columnNameToIndexCache.TryGetValue(key, out value);
40-
return value;
41-
}
42-
finally
43-
{
44-
cacheLock.ExitReadLock();
45-
}
46-
}
33+
private int? Read(string key)
34+
{
35+
cacheLock.EnterReadLock();
36+
try
37+
{
38+
int? value;
39+
columnNameToIndexCache.TryGetValue(key, out value);
40+
return value;
41+
}
42+
finally
43+
{
44+
cacheLock.ExitReadLock();
45+
}
46+
}
4747

48-
private void Insert(string key, int value)
49-
{
50-
cacheLock.EnterWriteLock();
51-
try
52-
{
53-
columnNameToIndexCache[key] = value;
54-
}
55-
finally
56-
{
57-
cacheLock.ExitWriteLock();
58-
}
59-
}
48+
private void Insert(string key, int value)
49+
{
50+
cacheLock.EnterWriteLock();
51+
try
52+
{
53+
columnNameToIndexCache[key] = value;
54+
}
55+
finally
56+
{
57+
cacheLock.ExitWriteLock();
58+
}
59+
}
6060
}
6161
}

0 commit comments

Comments
 (0)