Skip to content
This repository has been archived by the owner on Dec 23, 2017. It is now read-only.

Commit

Permalink
Merge pull request #46 from psibernetic/Streaming
Browse files Browse the repository at this point in the history
Streaming scopes and win
  • Loading branch information
Ovan Crone committed Oct 26, 2015
2 parents 3fb1e21 + 34dcced commit 71fa886
Show file tree
Hide file tree
Showing 97 changed files with 795 additions and 522 deletions.
2 changes: 1 addition & 1 deletion src/Susanoo.Core.Tests/App.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<connectionStrings>
<add name="Susanoo" connectionString="Data Source=(LocalDB)\MSSQLLocalDb;Initial Catalog=tempdb;Integrated Security=True" providerName="System.Data.SqlClient"/>
<add name="Susanoo" connectionString="Data Source=(LocalDB)\MSSQLLocalDb;Initial Catalog=tempdb;Integrated Security=True;MultipleActiveResultSets=True" providerName="System.Data.SqlClient"/>
</connectionStrings>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0,Profile=Client"/></startup></configuration>
4 changes: 2 additions & 2 deletions src/Susanoo.Core.Tests/DbManager/ConnectionTests.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using System.Data;
using NUnit.Framework;
using NUnit.Framework;
using System.Data;

namespace Susanoo.Tests.DbManager
{
Expand Down
2 changes: 1 addition & 1 deletion src/Susanoo.Core.Tests/Dynamic/DynamicTypeTest.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#region

using NUnit.Framework;
using System;
using System.Data;
using System.Linq;
using NUnit.Framework;

#endregion

Expand Down
4 changes: 2 additions & 2 deletions src/Susanoo.Core.Tests/Inserts/DBNullCheck.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#region

using System;
using System.Data;
using NUnit.Framework;
using Susanoo.Exceptions;
using System;
using System.Data;

#endregion

Expand Down
8 changes: 4 additions & 4 deletions src/Susanoo.Core.Tests/InterceptedSusanooBootstrapper.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Diagnostics;
using Susanoo.Deserialization;
using Susanoo.Deserialization;
using Susanoo.Processing;
using Susanoo.ResultSets;
using System.Diagnostics;

namespace Susanoo.Tests
{
Expand Down Expand Up @@ -30,8 +30,8 @@ public InterceptedSingleResultSetFactory(IDeserializerResolver deserializerResol
/// <param name="mappings">The mappings.</param>
/// <param name="name">The name.</param>
/// <returns>INoResultCommandProcessor&lt;TFilter, TResult&gt;.</returns>
public override ISingleResultSetCommandProcessor<TFilter, TResult> BuildCommandProcessor<TFilter, TResult>(ICommandResultInfo<TFilter> mappings, string name = null)
=> base.BuildCommandProcessor<TFilter, TResult>(mappings, name)
public override ISingleResultSetCommandProcessor<TFilter, TResult> BuildCommandProcessor<TFilter, TResult>(ICommandResultInfo<TFilter> mappings)
=> base.BuildCommandProcessor<TFilter, TResult>(mappings)
.InterceptExceptions(ex => Debug.Print($"{ex.Info.CommandText}"));
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/Susanoo.Core.Tests/Setup.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#region

using System.Data;
using NUnit.Framework;
using System.Data;

#endregion

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#region

using NUnit.Framework;
using System.Data;
using System.Linq;
using NUnit.Framework;

#endregion

Expand Down
17 changes: 11 additions & 6 deletions src/Susanoo.Core.Tests/Static/SingleResult/BuiltInTypes.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using System;
using NUnit.Framework;
using Susanoo.Exceptions;
using System;
using System.Data;
using System.Linq;
using NUnit.Framework;
using Susanoo.Exceptions;

namespace Susanoo.Tests.Static.SingleResult
{
Expand Down Expand Up @@ -59,12 +59,17 @@ public void IntNullTest()
}
catch (AggregateException ex)
when (ex.InnerExceptions.Count == 1
&& ex.InnerExceptions.Any(iex =>
iex.GetType() == typeof(SusanooExecutionException)
&& iex.InnerException.GetType() == typeof(InvalidCastException)))
&& ex.InnerExceptions.Any(iex =>
iex.GetType() == typeof (SusanooExecutionException)
&& iex.InnerException.GetType() == typeof (InvalidCastException)))
{
//Valid exceptions
}
catch (SusanooExecutionException ex)
when (ex.InnerException.GetType() == typeof (InvalidCastException))
{

}
}

[Test]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#region

using NUnit.Framework;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using NUnit.Framework;

#endregion

Expand Down
3 changes: 1 addition & 2 deletions src/Susanoo.Core.Tests/Static/SingleResult/StaticTypeTest.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
#region

using NUnit.Framework;
using System;
using System.Data;
using System.Linq;
using NUnit.Framework;
using Susanoo.Processing;

#endregion

Expand Down
4 changes: 2 additions & 2 deletions src/Susanoo.Core/Command/CommandExpression.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#region

using Susanoo.Processing;
using Susanoo.ResultSets;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.Common;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
using Susanoo.Processing;
using Susanoo.ResultSets;

#endregion

Expand Down
6 changes: 3 additions & 3 deletions src/Susanoo.Core/Command/CommandExpressionFactory.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.Data;
using Susanoo.Processing;
using Susanoo.Processing;
using Susanoo.ResultSets;
using System;
using System.Data;

namespace Susanoo.Command
{
Expand Down
4 changes: 2 additions & 2 deletions src/Susanoo.Core/Command/ICommandExpression.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#region

using Susanoo.Processing;
using Susanoo.ResultSets;
using System;
using System.Data.Common;
using System.Diagnostics.CodeAnalysis;
using System.Linq.Expressions;
using Susanoo.Processing;
using Susanoo.ResultSets;

#endregion

Expand Down
2 changes: 1 addition & 1 deletion src/Susanoo.Core/CommandManager.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#region

using Susanoo.Command;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Data;
using System.Reflection;
using System.Reflection.Emit;
using Susanoo.Command;

#endregion

Expand Down
2 changes: 1 addition & 1 deletion src/Susanoo.Core/DatabaseManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,6 @@ public static DatabaseManager CreateFromConnectionString(string connectionString
/// <param name="provider">The provider.</param>
/// <param name="connectionString">The connection string.</param>
/// <returns>DatabaseManager.</returns>
/// <exception cref="ArgumentException">Provider is a required component of the connection string.</exception>
public static DatabaseManager CreateFromConnectionString(DbProviderFactory provider, string connectionString)

{
Expand Down Expand Up @@ -479,6 +478,7 @@ public static object CastValue(Type newType, object value)
/// <param name="commandTimeout">The command timeout.</param>
/// <param name="parameters">The parameters.</param>
/// <returns>DbCommand.</returns>
[SuppressMessage("Microsoft.Security", "CA2100:Review SQL queries for security vulnerabilities")]
protected virtual DbCommand PrepCommand(DbConnection connection, string commandText, CommandType commandType,
TimeSpan commandTimeout, params DbParameter[] parameters)
{
Expand Down
Loading

0 comments on commit 71fa886

Please sign in to comment.