Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
CAP
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tsai
CAP
Commits
3aab6b23
Commit
3aab6b23
authored
Aug 10, 2018
by
Savorboard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor
parent
c5b0b678
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
2 deletions
+5
-2
CAP.MongoDBCapOptionsExtension.cs
src/DotNetCore.CAP.MongoDB/CAP.MongoDBCapOptionsExtension.cs
+3
-2
CAP.MongoDBOptions.cs
src/DotNetCore.CAP.MongoDB/CAP.MongoDBOptions.cs
+1
-0
MongoDBUtil.cs
src/DotNetCore.CAP.MongoDB/MongoDBUtil.cs
+1
-0
No files found.
src/DotNetCore.CAP.MongoDB/CAP.MongoDBCapOptionsExtension.cs
View file @
3aab6b23
...
@@ -2,13 +2,13 @@
...
@@ -2,13 +2,13 @@
// Licensed under the MIT License. See License.txt in the project root for license information.
// Licensed under the MIT License. See License.txt in the project root for license information.
using
System
;
using
System
;
using
DotNetCore.CAP
;
using
DotNetCore.CAP.Abstractions
;
using
DotNetCore.CAP.Abstractions
;
using
DotNetCore.CAP.Processor
;
using
DotNetCore.CAP.Processor
;
using
Microsoft.Extensions.DependencyInjection
;
using
Microsoft.Extensions.DependencyInjection
;
namespace
DotNetCore.CAP.MongoDB
namespace
DotNetCore.CAP.MongoDB
{
{
// ReSharper disable once InconsistentNaming
public
class
MongoDBCapOptionsExtension
:
ICapOptionsExtension
public
class
MongoDBCapOptionsExtension
:
ICapOptionsExtension
{
{
private
readonly
Action
<
MongoDBOptions
>
_configure
;
private
readonly
Action
<
MongoDBOptions
>
_configure
;
...
@@ -23,10 +23,11 @@ namespace DotNetCore.CAP.MongoDB
...
@@ -23,10 +23,11 @@ namespace DotNetCore.CAP.MongoDB
services
.
AddSingleton
<
CapDatabaseStorageMarkerService
>();
services
.
AddSingleton
<
CapDatabaseStorageMarkerService
>();
services
.
AddSingleton
<
IStorage
,
MongoDBStorage
>();
services
.
AddSingleton
<
IStorage
,
MongoDBStorage
>();
services
.
AddSingleton
<
IStorageConnection
,
MongoDBStorageConnection
>();
services
.
AddSingleton
<
IStorageConnection
,
MongoDBStorageConnection
>();
services
.
AddScoped
<
ICapPublisher
,
CapPublisher
>();
services
.
AddScoped
<
ICapPublisher
,
CapPublisher
>();
services
.
AddScoped
<
ICallbackPublisher
,
CapPublisher
>();
services
.
AddScoped
<
ICallbackPublisher
,
CapPublisher
>();
services
.
AddTransient
<
ICollectProcessor
,
MongoDBCollectProcessor
>();
services
.
AddTransient
<
ICollectProcessor
,
MongoDBCollectProcessor
>();
services
.
AddTransient
<
IMongoTransaction
,
MongoTransaction
>();
services
.
AddTransient
<
IMongoTransaction
,
MongoTransaction
>();
var
options
=
new
MongoDBOptions
();
var
options
=
new
MongoDBOptions
();
...
...
src/DotNetCore.CAP.MongoDB/CAP.MongoDBOptions.cs
View file @
3aab6b23
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
namespace
DotNetCore.CAP.MongoDB
namespace
DotNetCore.CAP.MongoDB
{
{
// ReSharper disable once InconsistentNaming
public
class
MongoDBOptions
public
class
MongoDBOptions
{
{
/// <summary>
/// <summary>
...
...
src/DotNetCore.CAP.MongoDB/MongoDBUtil.cs
View file @
3aab6b23
...
@@ -28,6 +28,7 @@ namespace DotNetCore.CAP.MongoDB
...
@@ -28,6 +28,7 @@ namespace DotNetCore.CAP.MongoDB
if
(
session
==
null
)
if
(
session
==
null
)
{
{
result
=
await
collection
.
FindOneAndUpdateAsync
(
filter
,
updateDef
,
_options
);
result
=
await
collection
.
FindOneAndUpdateAsync
(
filter
,
updateDef
,
_options
);
}
}
else
else
{
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment