2012-10-19 13:20:57 -02:00
|
|
|
|
using System;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Umbraco.Core.Persistence.SqlSyntax
|
|
|
|
|
|
{
|
2012-10-23 08:09:01 -02:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Singleton to handle the configuration of an SqlSyntaxProvider
|
|
|
|
|
|
/// </summary>
|
2012-10-19 13:20:57 -02:00
|
|
|
|
internal static class SyntaxConfig
|
|
|
|
|
|
{
|
|
|
|
|
|
private static ISqlSyntaxProvider _sqlSyntaxProvider;
|
|
|
|
|
|
|
|
|
|
|
|
public static ISqlSyntaxProvider SqlSyntaxProvider
|
|
|
|
|
|
{
|
|
|
|
|
|
get
|
|
|
|
|
|
{
|
|
|
|
|
|
if(_sqlSyntaxProvider == null)
|
|
|
|
|
|
{
|
|
|
|
|
|
throw new ArgumentNullException("SqlSyntaxProvider",
|
|
|
|
|
|
"You must set the singleton 'Umbraco.Core.Persistence.SqlSyntax.SyntaxConfig' to use an sql syntax provider");
|
|
|
|
|
|
}
|
|
|
|
|
|
return _sqlSyntaxProvider;
|
|
|
|
|
|
}
|
|
|
|
|
|
set { _sqlSyntaxProvider = value; }
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|