Update aspnet50/aspnetcore50 => dnx451/dnxcore50.

This commit is contained in:
N. Taylor Mullen 2015-03-08 12:57:19 -07:00
Родитель d149542f6a
Коммит 7706eeee8b
12 изменённых файлов: 31 добавлений и 31 удалений

Просмотреть файл

@ -70,7 +70,7 @@ namespace Microsoft.AspNet.SignalR.SqlServer
return Execute(cmd => cmd.ExecuteNonQueryAsync());
}
#if ASPNET50
#if DNX451
public virtual int ExecuteReader(Action<IDataRecord, DbOperation> processRecord)
#else
public virtual int ExecuteReader(Action<DbDataReader, DbOperation> processRecord)
@ -79,7 +79,7 @@ namespace Microsoft.AspNet.SignalR.SqlServer
return ExecuteReader(processRecord, null);
}
#if ASPNET50
#if DNX451
protected virtual int ExecuteReader(Action<IDataRecord, DbOperation> processRecord, Action<IDbCommand> commandAction)
#else
protected virtual int ExecuteReader(Action<DbDataReader, DbOperation> processRecord, Action<DbCommand> commandAction)
@ -105,7 +105,7 @@ namespace Microsoft.AspNet.SignalR.SqlServer
});
}
#if ASPNET50
#if DNX451
protected virtual IDbCommand CreateCommand(IDbConnection connection)
#else
protected virtual DbCommand CreateCommand(DbConnection connection)
@ -125,7 +125,7 @@ namespace Microsoft.AspNet.SignalR.SqlServer
return command;
}
#if ASPNET50
#if DNX451
private T Execute<T>(Func<IDbCommand, T> commandFunc)
#else
private T Execute<T>(Func<DbCommand, T> commandFunc)
@ -141,7 +141,7 @@ namespace Microsoft.AspNet.SignalR.SqlServer
}
}
#if ASPNET50
#if DNX451
private void LoggerCommand(IDbCommand command)
#else
private void LoggerCommand(DbCommand command)
@ -156,7 +156,7 @@ namespace Microsoft.AspNet.SignalR.SqlServer
}
}
#if ASPNET50
#if DNX451
private async Task<T> Execute<T>(Func<IDbCommand, Task<T>> commandFunc)
#else
private async Task<T> Execute<T>(Func<DbCommand, Task<T>> commandFunc)

Просмотреть файл

@ -15,7 +15,7 @@ namespace Microsoft.AspNet.SignalR.SqlServer
_dbProviderFactory = dbProviderFactory;
}
#if ASPNET50
#if DNX451
public IDbConnection CreateConnection()
#else
public DbConnection CreateConnection()

Просмотреть файл

@ -1,7 +1,7 @@
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
#if ASPNET50
#if DNX451
using System;
using System.Data;
using System.Data.SqlClient;

Просмотреть файл

@ -14,7 +14,7 @@ namespace Microsoft.AspNet.SignalR.SqlServer
bool StartSqlDependencyListener();
IList<Tuple<int, int>> UpdateLoopRetryDelays { get; }
#if ASPNET50
#if DNX451
void AddSqlDependency(IDbCommand command, Action<SqlNotificationEventArgs> callback);
#endif
}

Просмотреть файл

@ -15,7 +15,7 @@ namespace Microsoft.AspNet.SignalR.SqlServer
{
private readonly static TimeSpan _dependencyTimeout = TimeSpan.FromSeconds(60);
#if ASPNET50
#if DNX451
public static void AddSqlDependency([NotNull]this IDbCommand command, Action<SqlNotificationEventArgs> callback)
{
var sqlCommand = command as SqlCommand;
@ -29,7 +29,7 @@ namespace Microsoft.AspNet.SignalR.SqlServer
}
#endif
#if ASPNET50
#if DNX451
public static Task<int> ExecuteNonQueryAsync(this IDbCommand command)
#else
public static Task<int> ExecuteNonQueryAsync(this DbCommand command)
@ -39,7 +39,7 @@ namespace Microsoft.AspNet.SignalR.SqlServer
if (sqlCommand != null)
{
#if ASPNET50
#if DNX451
return Task.Factory.FromAsync(
(cb, state) => sqlCommand.BeginExecuteNonQuery(cb, state),
iar => sqlCommand.EndExecuteNonQuery(iar),

Просмотреть файл

@ -8,7 +8,7 @@ namespace Microsoft.AspNet.SignalR.SqlServer
{
public interface IDbProviderFactory
{
#if ASPNET50
#if DNX451
IDbConnection CreateConnection();
#else
DbConnection CreateConnection();

Просмотреть файл

@ -69,13 +69,13 @@ namespace Microsoft.AspNet.SignalR.SqlServer
{
Faulted += _ => { };
Queried += () => { };
#if ASPNET50
#if DNX451
Changed += () => { };
#endif
}
public event Action Queried;
#if ASPNET50
#if DNX451
public event Action Changed;
#endif
public event Action<Exception> Faulted;
@ -85,7 +85,7 @@ namespace Microsoft.AspNet.SignalR.SqlServer
/// </summary>
[SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity", Justification = "Needs refactoring"),
SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Errors are reported via the callback")]
#if ASPNET50
#if DNX451
public void ExecuteReaderWithUpdates(Action<IDataRecord, DbOperation> processRecord)
#else
public void ExecuteReaderWithUpdates(Action<DbDataReader, DbOperation> processRecord)
@ -171,7 +171,7 @@ namespace Microsoft.AspNet.SignalR.SqlServer
}
else
{
#if ASPNET50
#if DNX451
// No records after all retries, set up a SQL notification
try
{
@ -258,7 +258,7 @@ namespace Microsoft.AspNet.SignalR.SqlServer
_disposing = true;
}
#if ASPNET50
#if DNX451
if (_notificationState != NotificationState.Disabled)
{
try
@ -275,7 +275,7 @@ namespace Microsoft.AspNet.SignalR.SqlServer
_stopHandle.Dispose();
}
#if ASPNET50
#if DNX451
protected virtual void AddSqlDependency(IDbCommand command, Action<SqlNotificationEventArgs> callback)
{
command.AddSqlDependency(e => callback(e));
@ -365,7 +365,7 @@ namespace Microsoft.AspNet.SignalR.SqlServer
[SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "I need to")]
protected virtual bool StartSqlDependencyListener()
{
#if ASPNETCORE50
#if DNXCORE50
return false;
#else
lock (_stopLocker)
@ -420,7 +420,7 @@ namespace Microsoft.AspNet.SignalR.SqlServer
if (_notificationState != NotificationState.Disabled)
{
#if ASPNET50
#if DNX451
try
{
Logger.LogVerbose("{0}Stopping SQL notification listener", LoggerPrefix);
@ -462,7 +462,7 @@ namespace Microsoft.AspNet.SignalR.SqlServer
get { return _updateLoopRetryDelays; }
}
#if ASPNET50
#if DNX451
void IDbBehavior.AddSqlDependency(IDbCommand command, Action<SqlNotificationEventArgs> callback)
{
AddSqlDependency(command, callback);

Просмотреть файл

@ -6,7 +6,7 @@ using System;
namespace Microsoft.AspNet.SignalR.SqlServer
{
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1032:ImplementStandardExceptionConstructors", Justification="Should never have inner exceptions")]
#if ASPNET50
#if DNX451
[Serializable]
#endif
public class SqlMessageBusException : Exception

Просмотреть файл

@ -18,7 +18,7 @@ namespace Microsoft.AspNet.SignalR.SqlServer
return message.ToBytes();
}
#if ASPNET50
#if DNX451
public static ScaleoutMessage FromBytes(IDataRecord record)
#else
public static ScaleoutMessage FromBytes(DbDataReader record)

Просмотреть файл

@ -123,7 +123,7 @@ namespace Microsoft.AspNet.SignalR.SqlServer
_dbOperation.Queried += () => Queried();
_dbOperation.Faulted += ex => Faulted(ex);
#if ASPNET50
#if DNX451
_dbOperation.Changed += () =>
{
_logger.LogInformation("{0}Starting receive loop again to process updates", _loggerPrefix);
@ -138,7 +138,7 @@ namespace Microsoft.AspNet.SignalR.SqlServer
_logger.LogInformation("{0}SqlReceiver.Receive returned", _loggerPrefix);
}
#if ASPNET50
#if DNX451
private void ProcessRecord(IDataRecord record, DbOperation dbOperation)
#else
private void ProcessRecord(DbDataReader record, DbOperation dbOperation)

Просмотреть файл

@ -1,4 +1,4 @@
{
{
"version": "3.0.0-*",
"description": "Core server components for ASP.NET SignalR.",
"dependencies": {
@ -9,12 +9,12 @@
},
"resources": "install.sql;send.sql",
"frameworks": {
"aspnet50": {
"dnx451": {
"frameworkAssemblies": {
"System.Data": ""
}
},
"aspnetcore50": {
"dnxcore50": {
"dependencies": {
"System.Data.Common": "4.0.0-*",
"System.Data.SqlClient": "4.0.0-*"

Просмотреть файл

@ -1,4 +1,4 @@
{
{
"dependencies": {
"Microsoft.AspNet.SignalR.SqlServer": "3.0.0-*",
"xunit.runner.kre": "1.0.0-*",
@ -8,7 +8,7 @@
"allowUnsafe": true
},
"frameworks": {
"aspnet50": { }
"dnx451": { }
},
"commands": {
"test": "xunit.runner.kre"