From 3f37a4531162e232ea35e4dfc6a07a6bc3ba167f Mon Sep 17 00:00:00 2001 From: Savorboard Date: Tue, 21 Aug 2018 16:07:15 +0800 Subject: [PATCH] =?UTF-8?q?=EF=BB=BFAdd=20file=20copyright?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ICapTransaction.MongoDB.cs | 7 +++++-- .../IClientSessionHandle.CAP.cs | 12 ++++++++---- src/DotNetCore.CAP.MySql/ICapTransaction.MySql.cs | 7 +++++-- .../IDbContextTransaction.CAP.cs | 9 ++++++--- .../ICapTransaction.PostgreSql.cs | 12 ++++++++---- .../IDbContextTransaction.CAP.cs | 9 ++++++--- .../ICapTransaction.SqlServer.cs | 12 ++++++++---- .../IDbContextTransaction.CAP.cs | 9 ++++++--- 8 files changed, 52 insertions(+), 25 deletions(-) diff --git a/src/DotNetCore.CAP.MongoDB/ICapTransaction.MongoDB.cs b/src/DotNetCore.CAP.MongoDB/ICapTransaction.MongoDB.cs index 4b85f1d..ab7d9ab 100644 --- a/src/DotNetCore.CAP.MongoDB/ICapTransaction.MongoDB.cs +++ b/src/DotNetCore.CAP.MongoDB/ICapTransaction.MongoDB.cs @@ -1,4 +1,7 @@ -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; // ReSharper disable once CheckNamespace @@ -69,4 +72,4 @@ namespace DotNetCore.CAP return BeginAndJoinToTransaction(clientSessionHandle, publisher, autoCommit); } } -} +} \ No newline at end of file diff --git a/src/DotNetCore.CAP.MongoDB/IClientSessionHandle.CAP.cs b/src/DotNetCore.CAP.MongoDB/IClientSessionHandle.CAP.cs index 3381d02..7a34177 100644 --- a/src/DotNetCore.CAP.MongoDB/IClientSessionHandle.CAP.cs +++ b/src/DotNetCore.CAP.MongoDB/IClientSessionHandle.CAP.cs @@ -1,4 +1,7 @@ -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 DotNetCore.CAP; using MongoDB.Bson; @@ -9,13 +12,13 @@ namespace MongoDB.Driver { internal class CapMongoDbClientSessionHandle : IClientSessionHandle { - private readonly ICapTransaction _transaction; private readonly IClientSessionHandle _sessionHandle; + private readonly ICapTransaction _transaction; public CapMongoDbClientSessionHandle(ICapTransaction transaction) { _transaction = transaction; - _sessionHandle = (IClientSessionHandle)_transaction.DbTransaction; + _sessionHandle = (IClientSessionHandle) _transaction.DbTransaction; } public void Dispose() @@ -68,9 +71,10 @@ namespace MongoDB.Driver public ClientSessionOptions Options => _sessionHandle.Options; public IServerSession ServerSession => _sessionHandle.ServerSession; public ICoreSessionHandle WrappedCoreSession => _sessionHandle.WrappedCoreSession; + public IClientSessionHandle Fork() { return _sessionHandle.Fork(); } } -} +} \ No newline at end of file diff --git a/src/DotNetCore.CAP.MySql/ICapTransaction.MySql.cs b/src/DotNetCore.CAP.MySql/ICapTransaction.MySql.cs index 2dce16c..7b0377b 100644 --- a/src/DotNetCore.CAP.MySql/ICapTransaction.MySql.cs +++ b/src/DotNetCore.CAP.MySql/ICapTransaction.MySql.cs @@ -1,7 +1,10 @@ -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 Microsoft.EntityFrameworkCore.Storage; using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Storage; // ReSharper disable once CheckNamespace namespace DotNetCore.CAP diff --git a/src/DotNetCore.CAP.MySql/IDbContextTransaction.CAP.cs b/src/DotNetCore.CAP.MySql/IDbContextTransaction.CAP.cs index dbfa691..980dc57 100644 --- a/src/DotNetCore.CAP.MySql/IDbContextTransaction.CAP.cs +++ b/src/DotNetCore.CAP.MySql/IDbContextTransaction.CAP.cs @@ -1,4 +1,7 @@ -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; // ReSharper disable once CheckNamespace @@ -11,7 +14,7 @@ namespace Microsoft.EntityFrameworkCore.Storage public CapEFDbTransaction(ICapTransaction transaction) { _transaction = transaction; - var dbContextTransaction = (IDbContextTransaction)_transaction.DbTransaction; + var dbContextTransaction = (IDbContextTransaction) _transaction.DbTransaction; TransactionId = dbContextTransaction.TransactionId; } @@ -32,4 +35,4 @@ namespace Microsoft.EntityFrameworkCore.Storage public Guid TransactionId { get; } } -} +} \ No newline at end of file diff --git a/src/DotNetCore.CAP.PostgreSql/ICapTransaction.PostgreSql.cs b/src/DotNetCore.CAP.PostgreSql/ICapTransaction.PostgreSql.cs index a14914c..799bc21 100644 --- a/src/DotNetCore.CAP.PostgreSql/ICapTransaction.PostgreSql.cs +++ b/src/DotNetCore.CAP.PostgreSql/ICapTransaction.PostgreSql.cs @@ -1,4 +1,7 @@ -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 Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Storage; @@ -8,7 +11,9 @@ namespace DotNetCore.CAP { public class PostgreSqlCapTransaction : CapTransactionBase { - public PostgreSqlCapTransaction(IDispatcher dispatcher) : base(dispatcher) { } + public PostgreSqlCapTransaction(IDispatcher dispatcher) : base(dispatcher) + { + } public override void Commit() { @@ -67,5 +72,4 @@ namespace DotNetCore.CAP return new CapEFDbTransaction(capTrans); } } - -} +} \ No newline at end of file diff --git a/src/DotNetCore.CAP.PostgreSql/IDbContextTransaction.CAP.cs b/src/DotNetCore.CAP.PostgreSql/IDbContextTransaction.CAP.cs index dbfa691..980dc57 100644 --- a/src/DotNetCore.CAP.PostgreSql/IDbContextTransaction.CAP.cs +++ b/src/DotNetCore.CAP.PostgreSql/IDbContextTransaction.CAP.cs @@ -1,4 +1,7 @@ -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; // ReSharper disable once CheckNamespace @@ -11,7 +14,7 @@ namespace Microsoft.EntityFrameworkCore.Storage public CapEFDbTransaction(ICapTransaction transaction) { _transaction = transaction; - var dbContextTransaction = (IDbContextTransaction)_transaction.DbTransaction; + var dbContextTransaction = (IDbContextTransaction) _transaction.DbTransaction; TransactionId = dbContextTransaction.TransactionId; } @@ -32,4 +35,4 @@ namespace Microsoft.EntityFrameworkCore.Storage public Guid TransactionId { get; } } -} +} \ No newline at end of file diff --git a/src/DotNetCore.CAP.SqlServer/ICapTransaction.SqlServer.cs b/src/DotNetCore.CAP.SqlServer/ICapTransaction.SqlServer.cs index 14e80b0..a8e051e 100644 --- a/src/DotNetCore.CAP.SqlServer/ICapTransaction.SqlServer.cs +++ b/src/DotNetCore.CAP.SqlServer/ICapTransaction.SqlServer.cs @@ -1,4 +1,7 @@ -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 Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Storage; @@ -8,7 +11,9 @@ namespace DotNetCore.CAP { public class SqlServerCapTransaction : CapTransactionBase { - public SqlServerCapTransaction(IDispatcher dispatcher) : base(dispatcher) { } + public SqlServerCapTransaction(IDispatcher dispatcher) : base(dispatcher) + { + } public override void Commit() { @@ -67,5 +72,4 @@ namespace DotNetCore.CAP return new CapEFDbTransaction(capTrans); } } - -} +} \ No newline at end of file diff --git a/src/DotNetCore.CAP.SqlServer/IDbContextTransaction.CAP.cs b/src/DotNetCore.CAP.SqlServer/IDbContextTransaction.CAP.cs index dbfa691..980dc57 100644 --- a/src/DotNetCore.CAP.SqlServer/IDbContextTransaction.CAP.cs +++ b/src/DotNetCore.CAP.SqlServer/IDbContextTransaction.CAP.cs @@ -1,4 +1,7 @@ -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; // ReSharper disable once CheckNamespace @@ -11,7 +14,7 @@ namespace Microsoft.EntityFrameworkCore.Storage public CapEFDbTransaction(ICapTransaction transaction) { _transaction = transaction; - var dbContextTransaction = (IDbContextTransaction)_transaction.DbTransaction; + var dbContextTransaction = (IDbContextTransaction) _transaction.DbTransaction; TransactionId = dbContextTransaction.TransactionId; } @@ -32,4 +35,4 @@ namespace Microsoft.EntityFrameworkCore.Storage public Guid TransactionId { get; } } -} +} \ No newline at end of file