diff --git a/src/NHibernate/Cache/Timestamper.cs b/src/NHibernate/Cache/Timestamper.cs
index 86d5ddfaae9..a960041861d 100644
--- a/src/NHibernate/Cache/Timestamper.cs
+++ b/src/NHibernate/Cache/Timestamper.cs
@@ -9,7 +9,7 @@ namespace NHibernate.Cache
/// Not valid across multiple application domains. Identifiers are not necessarily
/// strictly increasing, but usually are.
///
- public sealed class Timestamper
+ public static class Timestamper
{
private static object lockObject = new object();
@@ -47,9 +47,5 @@ public static long Next()
return time + counter;
}
}
-
- private Timestamper()
- {
- }
}
}
\ No newline at end of file
diff --git a/src/NHibernate/Connection/ConnectionProviderFactory.cs b/src/NHibernate/Connection/ConnectionProviderFactory.cs
index 1c4550c2d55..f6d247c8b56 100644
--- a/src/NHibernate/Connection/ConnectionProviderFactory.cs
+++ b/src/NHibernate/Connection/ConnectionProviderFactory.cs
@@ -9,16 +9,11 @@ namespace NHibernate.Connection
///
/// Instanciates a connection provider given configuration properties.
///
- public sealed class ConnectionProviderFactory
+ public static class ConnectionProviderFactory
{
private static readonly IInternalLogger log = LoggerProvider.LoggerFor(typeof(ConnectionProviderFactory));
// cannot be instantiated
- private ConnectionProviderFactory()
- {
- throw new InvalidOperationException("ConnectionProviderFactory can not be instantiated.");
- }
-
public static IConnectionProvider NewConnectionProvider(IDictionary settings)
{
IConnectionProvider connections;
diff --git a/src/NHibernate/Engine/JoinHelper.cs b/src/NHibernate/Engine/JoinHelper.cs
index ce8e00aaec3..34922bc04eb 100644
--- a/src/NHibernate/Engine/JoinHelper.cs
+++ b/src/NHibernate/Engine/JoinHelper.cs
@@ -4,12 +4,8 @@
namespace NHibernate.Engine
{
- public sealed class JoinHelper
+ public static class JoinHelper
{
- private JoinHelper()
- {
- }
-
public static ILhsAssociationTypeSqlInfo GetLhsSqlInfo(string alias, int property,
IOuterJoinLoadable lhsPersister, IMapping mapping)
{
diff --git a/src/NHibernate/Engine/UnsavedValueFactory.cs b/src/NHibernate/Engine/UnsavedValueFactory.cs
index 2e4fe20c041..1f9b3cfed4c 100644
--- a/src/NHibernate/Engine/UnsavedValueFactory.cs
+++ b/src/NHibernate/Engine/UnsavedValueFactory.cs
@@ -5,12 +5,8 @@
namespace NHibernate.Engine
{
- public sealed class UnsavedValueFactory
+ public static class UnsavedValueFactory
{
- private UnsavedValueFactory()
- {
- }
-
private static readonly object[] NoParameters = new object[0];
private static object Instantiate(ConstructorInfo constructor)
diff --git a/src/NHibernate/Id/IdentifierGeneratorFactory.cs b/src/NHibernate/Id/IdentifierGeneratorFactory.cs
index 2733179ac72..0a44738fdaa 100644
--- a/src/NHibernate/Id/IdentifierGeneratorFactory.cs
+++ b/src/NHibernate/Id/IdentifierGeneratorFactory.cs
@@ -82,7 +82,7 @@ namespace NHibernate.Id
///
///
///
- public sealed class IdentifierGeneratorFactory
+ public static class IdentifierGeneratorFactory
{
private static readonly IInternalLogger log = LoggerProvider.LoggerFor(typeof (IdentifierGeneratorFactory));
@@ -180,11 +180,6 @@ static IdentifierGeneratorFactory()
idgenerators.Add("enhanced-table", typeof(Enhanced.TableGenerator));
}
- private IdentifierGeneratorFactory()
- {
- //cannot be instantiated
- }
-
///
/// Creates an from the named strategy.
///
diff --git a/src/NHibernate/Impl/MessageHelper.cs b/src/NHibernate/Impl/MessageHelper.cs
index 706ec6c3a4b..86c43851ad9 100644
--- a/src/NHibernate/Impl/MessageHelper.cs
+++ b/src/NHibernate/Impl/MessageHelper.cs
@@ -12,13 +12,8 @@ namespace NHibernate.Impl
///
/// Helper methods for rendering log messages and exception messages
///
- public sealed class MessageHelper
+ public static class MessageHelper
{
- private MessageHelper()
- {
- // should not be created
- }
-
///
/// Generate small message that can be used in traces and exception messages.
///
diff --git a/src/NHibernate/Persister/PersisterFactory.cs b/src/NHibernate/Persister/PersisterFactory.cs
index 0d707eea2a4..1231d4181f9 100644
--- a/src/NHibernate/Persister/PersisterFactory.cs
+++ b/src/NHibernate/Persister/PersisterFactory.cs
@@ -13,15 +13,11 @@ namespace NHibernate.Persister
///
/// Factory for IEntityPersister and ICollectionPersister instances.
///
- public sealed class PersisterFactory
+ public static class PersisterFactory
{
//TODO: make ClassPersisters *not* depend on ISessionFactoryImplementor
// interface, if possible
- private PersisterFactory()
- {
- }
-
private static readonly System.Type[] PersisterConstructorArgs = new System.Type[]
{
typeof(PersistentClass),
diff --git a/src/NHibernate/Properties/PropertyAccessorFactory.cs b/src/NHibernate/Properties/PropertyAccessorFactory.cs
index f598a376b4f..f7e4ee328a6 100644
--- a/src/NHibernate/Properties/PropertyAccessorFactory.cs
+++ b/src/NHibernate/Properties/PropertyAccessorFactory.cs
@@ -9,7 +9,7 @@ namespace NHibernate.Properties
///
/// Factory for creating the various PropertyAccessor strategies.
///
- public sealed class PropertyAccessorFactory
+ public static class PropertyAccessorFactory
{
private static readonly IDictionary accessors;
private const string DefaultAccessorName = "property";
@@ -45,10 +45,6 @@ static PropertyAccessorFactory()
accessors["none"] = new NoopAccessor();
}
- private PropertyAccessorFactory()
- {
- }
-
///
/// Gets or creates the specified by the type.
///
diff --git a/src/NHibernate/SqlCommand/Template.cs b/src/NHibernate/SqlCommand/Template.cs
index 59303d5f75f..7535f5723d1 100644
--- a/src/NHibernate/SqlCommand/Template.cs
+++ b/src/NHibernate/SqlCommand/Template.cs
@@ -8,7 +8,7 @@
namespace NHibernate.SqlCommand
{
- public sealed class Template
+ public static class Template
{
private static readonly HashSet Keywords = new HashSet();
private static readonly HashSet BeforeTableKeywords = new HashSet();
@@ -62,10 +62,6 @@ static Template()
public static readonly string Placeholder = "$PlaceHolder$";
- private Template()
- {
- }
-
public static string RenderWhereStringTemplate(string sqlWhereString, Dialect.Dialect dialect,
SQLFunctionRegistry functionRegistry)
{
diff --git a/src/NHibernate/Transform/Transformers.cs b/src/NHibernate/Transform/Transformers.cs
index 61b72299795..f6d2a6172cf 100644
--- a/src/NHibernate/Transform/Transformers.cs
+++ b/src/NHibernate/Transform/Transformers.cs
@@ -2,12 +2,8 @@
namespace NHibernate.Transform
{
- public sealed class Transformers
+ public static class Transformers
{
- private Transformers()
- {
- }
-
///
/// Each row of results is a map () from alias to values/entities
///
diff --git a/src/NHibernate/Util/CollectionPrinter.cs b/src/NHibernate/Util/CollectionPrinter.cs
index 389cd0e2a21..7e82d222a3f 100644
--- a/src/NHibernate/Util/CollectionPrinter.cs
+++ b/src/NHibernate/Util/CollectionPrinter.cs
@@ -13,7 +13,7 @@ namespace NHibernate.Util
/// To print collections of entities or typed values, use
/// .
///
- public sealed class CollectionPrinter
+ public static class CollectionPrinter
{
private static void AppendNullOrValue(StringBuilder builder, object value)
{