Skip to content

Commit df3079b

Browse files
author
Jeff Treuting
committed
Minor cleanup
Removed some unused commented out code
1 parent 130c0f8 commit df3079b

2 files changed

Lines changed: 1 addition & 44 deletions

File tree

SharpRepository.Repository/Caching/Hash/LocalCollectionExpander.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
using System.Collections.Generic;
44
using System.Linq;
55
using System.Linq.Expressions;
6-
using System.Text;
76

87
namespace SharpRepository.Repository.Caching.Hash
98
{
@@ -71,7 +70,7 @@ class Printer<T> : List<T>
7170
{
7271
public Printer(IEnumerable collection)
7372
{
74-
this.AddRange(collection.Cast<T>());
73+
AddRange(collection.Cast<T>());
7574
}
7675

7776
public override string ToString()

SharpRepository.Repository/RepositoryFactory.cs

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
using System;
2-
//using System.Collections.Concurrent;
3-
//using System.Collections.Generic;
42
using System.Configuration;
53
using System.Linq;
64
using SharpRepository.Repository.Configuration;
@@ -10,14 +8,6 @@ namespace SharpRepository.Repository
108
{
119
public static class RepositoryFactory
1210
{
13-
// private static readonly IDictionary<string, ISharpRepositoryConfiguration> _cache;
14-
// private static ISharpRepositoryConfiguration _configuration = null;
15-
//
16-
// static RepositoryFactory()
17-
// {
18-
// _cache = new ConcurrentDictionary<string, ISharpRepositoryConfiguration>();
19-
// }
20-
2111
public static IRepository<T, int> GetInstance<T>(string repositoryName = null) where T : class, new()
2212
{
2313
return GetInstance<T, int>(repositoryName);
@@ -50,22 +40,6 @@ public static object GetInstance(Type entityType, Type keyType, string repositor
5040

5141
public static IRepository<T, TKey> GetInstance<T, TKey>(string configSection, string repositoryName) where T : class, new()
5242
{
53-
// ISharpRepositoryConfiguration configuration;
54-
// var key = String.Format("{0}::{1}::{2}", typeof (T).FullName, typeof (TKey).Name, configSection);
55-
// // first check cache
56-
// if (_cache.ContainsKey(key))
57-
// {
58-
// configuration = _cache[key];
59-
// }
60-
// else
61-
// {
62-
// configuration = GetConfiguration(configSection);
63-
// _cache[key] = configuration;
64-
// }
65-
66-
// if (_configuration == null)
67-
// _configuration = GetConfiguration(configSection);
68-
6943
return GetInstance<T, TKey>(GetConfiguration(configSection), repositoryName);
7044
}
7145

@@ -123,22 +97,6 @@ public static object GetInstance(Type entityType, Type keyType, Type key2Type, s
12397

12498
public static ICompoundKeyRepository<T, TKey, TKey2> GetInstance<T, TKey, TKey2>(string configSection, string repositoryName) where T : class, new()
12599
{
126-
// ISharpRepositoryConfiguration configuration;
127-
// var key = String.Format("{0}::{1}::{2}", typeof (T).FullName, typeof (TKey).Name, configSection);
128-
// // first check cache
129-
// if (_cache.ContainsKey(key))
130-
// {
131-
// configuration = _cache[key];
132-
// }
133-
// else
134-
// {
135-
// configuration = GetConfiguration(configSection);
136-
// _cache[key] = configuration;
137-
// }
138-
139-
// if (_configuration == null)
140-
// _configuration = GetConfiguration(configSection);
141-
142100
return GetInstance<T, TKey, TKey2>(GetConfiguration(configSection), repositoryName);
143101
}
144102

0 commit comments

Comments
 (0)