Commit 3f37a453 authored by Savorboard's avatar Savorboard

Add file copyright

parent 406d338a
using System.Diagnostics; // Copyright (c) .NET Core Community. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
using System.Diagnostics;
using MongoDB.Driver; using MongoDB.Driver;
// ReSharper disable once CheckNamespace // ReSharper disable once CheckNamespace
......
using System.Threading; // Copyright (c) .NET Core Community. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using DotNetCore.CAP; using DotNetCore.CAP;
using MongoDB.Bson; using MongoDB.Bson;
...@@ -9,13 +12,13 @@ namespace MongoDB.Driver ...@@ -9,13 +12,13 @@ namespace MongoDB.Driver
{ {
internal class CapMongoDbClientSessionHandle : IClientSessionHandle internal class CapMongoDbClientSessionHandle : IClientSessionHandle
{ {
private readonly ICapTransaction _transaction;
private readonly IClientSessionHandle _sessionHandle; private readonly IClientSessionHandle _sessionHandle;
private readonly ICapTransaction _transaction;
public CapMongoDbClientSessionHandle(ICapTransaction transaction) public CapMongoDbClientSessionHandle(ICapTransaction transaction)
{ {
_transaction = transaction; _transaction = transaction;
_sessionHandle = (IClientSessionHandle)_transaction.DbTransaction; _sessionHandle = (IClientSessionHandle) _transaction.DbTransaction;
} }
public void Dispose() public void Dispose()
...@@ -68,6 +71,7 @@ namespace MongoDB.Driver ...@@ -68,6 +71,7 @@ namespace MongoDB.Driver
public ClientSessionOptions Options => _sessionHandle.Options; public ClientSessionOptions Options => _sessionHandle.Options;
public IServerSession ServerSession => _sessionHandle.ServerSession; public IServerSession ServerSession => _sessionHandle.ServerSession;
public ICoreSessionHandle WrappedCoreSession => _sessionHandle.WrappedCoreSession; public ICoreSessionHandle WrappedCoreSession => _sessionHandle.WrappedCoreSession;
public IClientSessionHandle Fork() public IClientSessionHandle Fork()
{ {
return _sessionHandle.Fork(); return _sessionHandle.Fork();
......
using System.Data; // Copyright (c) .NET Core Community. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
using System.Data;
using System.Diagnostics; using System.Diagnostics;
using Microsoft.EntityFrameworkCore.Storage;
using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage;
// ReSharper disable once CheckNamespace // ReSharper disable once CheckNamespace
namespace DotNetCore.CAP namespace DotNetCore.CAP
......
using System; // Copyright (c) .NET Core Community. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
using System;
using DotNetCore.CAP; using DotNetCore.CAP;
// ReSharper disable once CheckNamespace // ReSharper disable once CheckNamespace
...@@ -11,7 +14,7 @@ namespace Microsoft.EntityFrameworkCore.Storage ...@@ -11,7 +14,7 @@ namespace Microsoft.EntityFrameworkCore.Storage
public CapEFDbTransaction(ICapTransaction transaction) public CapEFDbTransaction(ICapTransaction transaction)
{ {
_transaction = transaction; _transaction = transaction;
var dbContextTransaction = (IDbContextTransaction)_transaction.DbTransaction; var dbContextTransaction = (IDbContextTransaction) _transaction.DbTransaction;
TransactionId = dbContextTransaction.TransactionId; TransactionId = dbContextTransaction.TransactionId;
} }
......
using System.Data; // Copyright (c) .NET Core Community. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
using System.Data;
using System.Diagnostics; using System.Diagnostics;
using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage; using Microsoft.EntityFrameworkCore.Storage;
...@@ -8,7 +11,9 @@ namespace DotNetCore.CAP ...@@ -8,7 +11,9 @@ namespace DotNetCore.CAP
{ {
public class PostgreSqlCapTransaction : CapTransactionBase public class PostgreSqlCapTransaction : CapTransactionBase
{ {
public PostgreSqlCapTransaction(IDispatcher dispatcher) : base(dispatcher) { } public PostgreSqlCapTransaction(IDispatcher dispatcher) : base(dispatcher)
{
}
public override void Commit() public override void Commit()
{ {
...@@ -67,5 +72,4 @@ namespace DotNetCore.CAP ...@@ -67,5 +72,4 @@ namespace DotNetCore.CAP
return new CapEFDbTransaction(capTrans); return new CapEFDbTransaction(capTrans);
} }
} }
} }
\ No newline at end of file
using System; // Copyright (c) .NET Core Community. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
using System;
using DotNetCore.CAP; using DotNetCore.CAP;
// ReSharper disable once CheckNamespace // ReSharper disable once CheckNamespace
...@@ -11,7 +14,7 @@ namespace Microsoft.EntityFrameworkCore.Storage ...@@ -11,7 +14,7 @@ namespace Microsoft.EntityFrameworkCore.Storage
public CapEFDbTransaction(ICapTransaction transaction) public CapEFDbTransaction(ICapTransaction transaction)
{ {
_transaction = transaction; _transaction = transaction;
var dbContextTransaction = (IDbContextTransaction)_transaction.DbTransaction; var dbContextTransaction = (IDbContextTransaction) _transaction.DbTransaction;
TransactionId = dbContextTransaction.TransactionId; TransactionId = dbContextTransaction.TransactionId;
} }
......
using System.Data; // Copyright (c) .NET Core Community. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
using System.Data;
using System.Diagnostics; using System.Diagnostics;
using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage; using Microsoft.EntityFrameworkCore.Storage;
...@@ -8,7 +11,9 @@ namespace DotNetCore.CAP ...@@ -8,7 +11,9 @@ namespace DotNetCore.CAP
{ {
public class SqlServerCapTransaction : CapTransactionBase public class SqlServerCapTransaction : CapTransactionBase
{ {
public SqlServerCapTransaction(IDispatcher dispatcher) : base(dispatcher) { } public SqlServerCapTransaction(IDispatcher dispatcher) : base(dispatcher)
{
}
public override void Commit() public override void Commit()
{ {
...@@ -67,5 +72,4 @@ namespace DotNetCore.CAP ...@@ -67,5 +72,4 @@ namespace DotNetCore.CAP
return new CapEFDbTransaction(capTrans); return new CapEFDbTransaction(capTrans);
} }
} }
} }
\ No newline at end of file
using System; // Copyright (c) .NET Core Community. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
using System;
using DotNetCore.CAP; using DotNetCore.CAP;
// ReSharper disable once CheckNamespace // ReSharper disable once CheckNamespace
...@@ -11,7 +14,7 @@ namespace Microsoft.EntityFrameworkCore.Storage ...@@ -11,7 +14,7 @@ namespace Microsoft.EntityFrameworkCore.Storage
public CapEFDbTransaction(ICapTransaction transaction) public CapEFDbTransaction(ICapTransaction transaction)
{ {
_transaction = transaction; _transaction = transaction;
var dbContextTransaction = (IDbContextTransaction)_transaction.DbTransaction; var dbContextTransaction = (IDbContextTransaction) _transaction.DbTransaction;
TransactionId = dbContextTransaction.TransactionId; TransactionId = dbContextTransaction.TransactionId;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment