Pārlūkot izejas kodu

refactor

master
Savorboard pirms 6 gadiem
vecāks
revīzija
3aab6b2344
3 mainītis faili ar 5 papildinājumiem un 2 dzēšanām
  1. +3
    -2
      src/DotNetCore.CAP.MongoDB/CAP.MongoDBCapOptionsExtension.cs
  2. +1
    -0
      src/DotNetCore.CAP.MongoDB/CAP.MongoDBOptions.cs
  3. +1
    -0
      src/DotNetCore.CAP.MongoDB/MongoDBUtil.cs

+ 3
- 2
src/DotNetCore.CAP.MongoDB/CAP.MongoDBCapOptionsExtension.cs Parādīt failu

@@ -2,13 +2,13 @@
// Licensed under the MIT License. See License.txt in the project root for license information.

using System;
using DotNetCore.CAP;
using DotNetCore.CAP.Abstractions;
using DotNetCore.CAP.Processor;
using Microsoft.Extensions.DependencyInjection;

namespace DotNetCore.CAP.MongoDB
{
// ReSharper disable once InconsistentNaming
public class MongoDBCapOptionsExtension : ICapOptionsExtension
{
private readonly Action<MongoDBOptions> _configure;
@@ -23,10 +23,11 @@ namespace DotNetCore.CAP.MongoDB
services.AddSingleton<CapDatabaseStorageMarkerService>();
services.AddSingleton<IStorage, MongoDBStorage>();
services.AddSingleton<IStorageConnection, MongoDBStorageConnection>();

services.AddScoped<ICapPublisher, CapPublisher>();
services.AddScoped<ICallbackPublisher, CapPublisher>();
services.AddTransient<ICollectProcessor, MongoDBCollectProcessor>();

services.AddTransient<ICollectProcessor, MongoDBCollectProcessor>();
services.AddTransient<IMongoTransaction, MongoTransaction>();

var options = new MongoDBOptions();


+ 1
- 0
src/DotNetCore.CAP.MongoDB/CAP.MongoDBOptions.cs Parādīt failu

@@ -3,6 +3,7 @@

namespace DotNetCore.CAP.MongoDB
{
// ReSharper disable once InconsistentNaming
public class MongoDBOptions
{
/// <summary>


+ 1
- 0
src/DotNetCore.CAP.MongoDB/MongoDBUtil.cs Parādīt failu

@@ -28,6 +28,7 @@ namespace DotNetCore.CAP.MongoDB
if (session == null)
{
result = await collection.FindOneAndUpdateAsync(filter, updateDef, _options);
}
else
{


Notiek ielāde…
Atcelt
Saglabāt