Making the Sql Syntax Providers public and changing a few names and bits for consistency.
Adding resolver for the syntax providers and wiring it up in the boot manager.
This commit is contained in:
26
src/Umbraco.Core/Persistence/SqlSyntax/SqlSyntaxContext.cs
Normal file
26
src/Umbraco.Core/Persistence/SqlSyntax/SqlSyntaxContext.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
|
||||
namespace Umbraco.Core.Persistence.SqlSyntax
|
||||
{
|
||||
/// <summary>
|
||||
/// Singleton to handle the configuration of a SqlSyntaxProvider
|
||||
/// </summary>
|
||||
public static class SqlSyntaxContext
|
||||
{
|
||||
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.SqlSyntaxContext' to use an sql syntax provider");
|
||||
}
|
||||
return _sqlSyntaxProvider;
|
||||
}
|
||||
set { _sqlSyntaxProvider = value; }
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user