Skip to content

NH-3706 - NHibernate.Transform.Transformers should be static class #343

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 22, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions src/NHibernate/Cache/Timestamper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace NHibernate.Cache
/// Not valid across multiple application domains. Identifiers are not necessarily
/// strictly increasing, but usually are.
/// </remarks>
public sealed class Timestamper
public static class Timestamper
{
private static object lockObject = new object();

Expand Down Expand Up @@ -47,9 +47,5 @@ public static long Next()
return time + counter;
}
}

private Timestamper()
{
}
}
}
7 changes: 1 addition & 6 deletions src/NHibernate/Connection/ConnectionProviderFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,11 @@ namespace NHibernate.Connection
/// <summary>
/// Instanciates a connection provider given configuration properties.
/// </summary>
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<string, string> settings)
{
IConnectionProvider connections;
Expand Down
6 changes: 1 addition & 5 deletions src/NHibernate/Engine/JoinHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
6 changes: 1 addition & 5 deletions src/NHibernate/Engine/UnsavedValueFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
7 changes: 1 addition & 6 deletions src/NHibernate/Id/IdentifierGeneratorFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ namespace NHibernate.Id
/// </item>
/// </list>
/// </remarks>
public sealed class IdentifierGeneratorFactory
public static class IdentifierGeneratorFactory
{
private static readonly IInternalLogger log = LoggerProvider.LoggerFor(typeof (IdentifierGeneratorFactory));

Expand Down Expand Up @@ -180,11 +180,6 @@ static IdentifierGeneratorFactory()
idgenerators.Add("enhanced-table", typeof(Enhanced.TableGenerator));
}

private IdentifierGeneratorFactory()
{
//cannot be instantiated
}

/// <summary>
/// Creates an <see cref="IIdentifierGenerator"/> from the named strategy.
/// </summary>
Expand Down
7 changes: 1 addition & 6 deletions src/NHibernate/Impl/MessageHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,8 @@ namespace NHibernate.Impl
/// <summary>
/// Helper methods for rendering log messages and exception messages
/// </summary>
public sealed class MessageHelper
public static class MessageHelper
{
private MessageHelper()
{
// should not be created
}

/// <summary>
/// Generate small message that can be used in traces and exception messages.
/// </summary>
Expand Down
6 changes: 1 addition & 5 deletions src/NHibernate/Persister/PersisterFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,11 @@ namespace NHibernate.Persister
/// <summary>
/// Factory for <c>IEntityPersister</c> and <c>ICollectionPersister</c> instances.
/// </summary>
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),
Expand Down
6 changes: 1 addition & 5 deletions src/NHibernate/Properties/PropertyAccessorFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace NHibernate.Properties
/// <summary>
/// Factory for creating the various PropertyAccessor strategies.
/// </summary>
public sealed class PropertyAccessorFactory
public static class PropertyAccessorFactory
{
private static readonly IDictionary<string, IPropertyAccessor> accessors;
private const string DefaultAccessorName = "property";
Expand Down Expand Up @@ -45,10 +45,6 @@ static PropertyAccessorFactory()
accessors["none"] = new NoopAccessor();
}

private PropertyAccessorFactory()
{
}

/// <summary>
/// Gets or creates the <see cref="IPropertyAccessor" /> specified by the type.
/// </summary>
Expand Down
6 changes: 1 addition & 5 deletions src/NHibernate/SqlCommand/Template.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

namespace NHibernate.SqlCommand
{
public sealed class Template
public static class Template
{
private static readonly HashSet<string> Keywords = new HashSet<string>();
private static readonly HashSet<string> BeforeTableKeywords = new HashSet<string>();
Expand Down Expand Up @@ -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)
{
Expand Down
6 changes: 1 addition & 5 deletions src/NHibernate/Transform/Transformers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,8 @@

namespace NHibernate.Transform
{
public sealed class Transformers
public static class Transformers
{
private Transformers()
{
}

/// <summary>
/// Each row of results is a map (<see cref="IDictionary" />) from alias to values/entities
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion src/NHibernate/Util/CollectionPrinter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace NHibernate.Util
/// To print collections of entities or typed values, use
/// <see cref="NHibernate.Impl.Printer" />.
/// </remarks>
public sealed class CollectionPrinter
public static class CollectionPrinter
{
private static void AppendNullOrValue(StringBuilder builder, object value)
{
Expand Down