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
b3aeb1a2
Commit
b3aeb1a2
authored
Nov 18, 2019
by
Savorboard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactoring namespace
parent
9f84d7bf
Changes
48
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
48 changed files
with
282 additions
and
452 deletions
+282
-452
AzureServiceBusConsumerClient.cs
...Core.CAP.AzureServiceBus/AzureServiceBusConsumerClient.cs
+1
-0
AzureServiceBusConsumerClientFactory.cs
...P.AzureServiceBus/AzureServiceBusConsumerClientFactory.cs
+1
-0
DashboardRoutes.cs
src/DotNetCore.CAP.Dashboard/DashboardRoutes.cs
+2
-0
CAP.DiscoveryOptionsExtensions.cs
...Dashboard/NodeDiscovery/CAP.DiscoveryOptionsExtensions.cs
+1
-0
IProcessingServer.Consul.cs
...e.CAP.Dashboard/NodeDiscovery/IProcessingServer.Consul.cs
+2
-0
ICapTransaction.InMemory.cs
...otNetCore.CAP.InMemoryStorage/ICapTransaction.InMemory.cs
+1
-0
KafkaConsumerClient.cs
src/DotNetCore.CAP.Kafka/KafkaConsumerClient.cs
+1
-0
KafkaConsumerClientFactory.cs
src/DotNetCore.CAP.Kafka/KafkaConsumerClientFactory.cs
+1
-0
ICapTransaction.MongoDB.cs
src/DotNetCore.CAP.MongoDB/ICapTransaction.MongoDB.cs
+1
-0
ICapTransaction.MySql.cs
src/DotNetCore.CAP.MySql/ICapTransaction.MySql.cs
+1
-0
ICapTransaction.PostgreSql.cs
src/DotNetCore.CAP.PostgreSql/ICapTransaction.PostgreSql.cs
+1
-0
RabbitMQConsumerClient.cs
src/DotNetCore.CAP.RabbitMQ/RabbitMQConsumerClient.cs
+1
-0
RabbitMQConsumerClientFactory.cs
src/DotNetCore.CAP.RabbitMQ/RabbitMQConsumerClientFactory.cs
+1
-0
DiagnosticObserver.cs
...otNetCore.CAP.SqlServer/Diagnostics/DiagnosticObserver.cs
+1
-0
DiagnosticProcessorObserver.cs
....CAP.SqlServer/Diagnostics/DiagnosticProcessorObserver.cs
+1
-0
ICapTransaction.SqlServer.cs
src/DotNetCore.CAP.SqlServer/ICapTransaction.SqlServer.cs
+1
-0
IModelBinderFactory.cs
src/DotNetCore.CAP/Abstractions/IModelBinderFactory.cs
+0
-21
IModelBinder.cs
src/DotNetCore.CAP/Abstractions/ModelBinding/IModelBinder.cs
+0
-15
ModelBindingResult.cs
...tCore.CAP/Abstractions/ModelBinding/ModelBindingResult.cs
+0
-104
CAP.Attribute.cs
src/DotNetCore.CAP/CAP.Attribute.cs
+1
-1
CAP.Builder.cs
src/DotNetCore.CAP/CAP.Builder.cs
+0
-1
CAP.ServiceCollectionExtensions.cs
src/DotNetCore.CAP/CAP.ServiceCollectionExtensions.cs
+1
-1
ICapTransaction.Base.cs
src/DotNetCore.CAP/ICapTransaction.Base.cs
+1
-0
ConsumerExecutorDescriptor.cs
src/DotNetCore.CAP/Internal/ConsumerExecutorDescriptor.cs
+1
-2
ConsumerInvokerFactory.cs
src/DotNetCore.CAP/Internal/ConsumerInvokerFactory.cs
+0
-1
IBootstrapper.Default.cs
src/DotNetCore.CAP/Internal/IBootstrapper.Default.cs
+2
-2
IBootstrapper.cs
src/DotNetCore.CAP/Internal/IBootstrapper.cs
+1
-1
ICapPublisher.Default.cs
src/DotNetCore.CAP/Internal/ICapPublisher.Default.cs
+3
-3
IConsumerRegister.Default.cs
src/DotNetCore.CAP/Internal/IConsumerRegister.Default.cs
+2
-4
IConsumerRegister.cs
src/DotNetCore.CAP/Internal/IConsumerRegister.cs
+1
-1
IConsumerServiceSelector.Default.cs
...tNetCore.CAP/Internal/IConsumerServiceSelector.Default.cs
+231
-233
IConsumerServiceSelector.cs
src/DotNetCore.CAP/Internal/IConsumerServiceSelector.cs
+1
-1
IMongoTransaction.cs
src/DotNetCore.CAP/Internal/IMongoTransaction.cs
+3
-3
IProcessingServer.cs
src/DotNetCore.CAP/Internal/IProcessingServer.cs
+1
-1
ISubscriberExecutor.Default.cs
src/DotNetCore.CAP/Internal/ISubscriberExecutor.Default.cs
+2
-3
ISubscriberExecutor.cs
src/DotNetCore.CAP/Internal/ISubscriberExecutor.cs
+1
-1
LoggerExtensions.cs
src/DotNetCore.CAP/Internal/LoggerExtensions.cs
+1
-1
TopicAttribute.cs
src/DotNetCore.CAP/Internal/TopicAttribute.cs
+1
-1
MessageQueryDto.cs
src/DotNetCore.CAP/Monitoring/MessageQueryDto.cs
+1
-0
IDispatcher.Default.cs
src/DotNetCore.CAP/Processor/IDispatcher.Default.cs
+1
-0
IProcessingServer.Cap.cs
src/DotNetCore.CAP/Processor/IProcessingServer.Cap.cs
+1
-0
IProcessor.TransportCheck.cs
src/DotNetCore.CAP/Processor/IProcessor.TransportCheck.cs
+1
-0
IConsumerClient.cs
src/DotNetCore.CAP/Transport/IConsumerClient.cs
+1
-1
IConsumerClientFactory.cs
src/DotNetCore.CAP/Transport/IConsumerClientFactory.cs
+1
-1
IDispatcher.cs
src/DotNetCore.CAP/Transport/IDispatcher.cs
+2
-1
MqLogType.cs
src/DotNetCore.CAP/Transport/MqLogType.cs
+1
-1
ModelBinderFactoryTest.cs
test/DotNetCore.CAP.Test/ModelBinderFactoryTest.cs
+0
-46
SnowflakeIdTest.cs
test/DotNetCore.CAP.Test/SnowflakeIdTest.cs
+1
-1
No files found.
src/DotNetCore.CAP.AzureServiceBus/AzureServiceBusConsumerClient.cs
View file @
b3aeb1a2
...
...
@@ -8,6 +8,7 @@ using System.Text;
using
System.Threading
;
using
System.Threading.Tasks
;
using
DotNetCore.CAP.Messages
;
using
DotNetCore.CAP.Transport
;
using
Microsoft.Azure.ServiceBus
;
using
Microsoft.Azure.ServiceBus.Management
;
using
Microsoft.Extensions.Logging
;
...
...
src/DotNetCore.CAP.AzureServiceBus/AzureServiceBusConsumerClientFactory.cs
View file @
b3aeb1a2
// Copyright (c) .NET Core Community. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
using
DotNetCore.CAP.Transport
;
using
Microsoft.Extensions.Logging
;
using
Microsoft.Extensions.Options
;
...
...
src/DotNetCore.CAP.Dashboard/DashboardRoutes.cs
View file @
b3aeb1a2
...
...
@@ -3,6 +3,8 @@
using
System.Reflection
;
using
DotNetCore.CAP.Dashboard.Pages
;
using
DotNetCore.CAP.Internal
;
using
DotNetCore.CAP.Transport
;
using
Microsoft.Extensions.DependencyInjection
;
namespace
DotNetCore.CAP.Dashboard
...
...
src/DotNetCore.CAP.Dashboard/NodeDiscovery/CAP.DiscoveryOptionsExtensions.cs
View file @
b3aeb1a2
...
...
@@ -3,6 +3,7 @@
using
System
;
using
DotNetCore.CAP
;
using
DotNetCore.CAP.Internal
;
using
Microsoft.Extensions.DependencyInjection
;
namespace
DotNetCore.CAP.Dashboard.NodeDiscovery
...
...
src/DotNetCore.CAP.Dashboard/NodeDiscovery/IProcessingServer.Consul.cs
View file @
b3aeb1a2
// Copyright (c) .NET Core Community. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
using
DotNetCore.CAP.Internal
;
namespace
DotNetCore.CAP.Dashboard.NodeDiscovery
{
internal
class
ConsulProcessingNodeServer
:
IProcessingServer
...
...
src/DotNetCore.CAP.InMemoryStorage/ICapTransaction.InMemory.cs
View file @
b3aeb1a2
...
...
@@ -5,6 +5,7 @@
using
System.Threading
;
using
System.Threading.Tasks
;
using
DotNetCore.CAP.Transport
;
namespace
DotNetCore.CAP.InMemoryStorage
{
...
...
src/DotNetCore.CAP.Kafka/KafkaConsumerClient.cs
View file @
b3aeb1a2
...
...
@@ -8,6 +8,7 @@ using System.Text;
using
System.Threading
;
using
Confluent.Kafka
;
using
DotNetCore.CAP.Messages
;
using
DotNetCore.CAP.Transport
;
using
Microsoft.Extensions.Options
;
namespace
DotNetCore.CAP.Kafka
...
...
src/DotNetCore.CAP.Kafka/KafkaConsumerClientFactory.cs
View file @
b3aeb1a2
// Copyright (c) .NET Core Community. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
using
DotNetCore.CAP.Transport
;
using
Microsoft.Extensions.Options
;
namespace
DotNetCore.CAP.Kafka
...
...
src/DotNetCore.CAP.MongoDB/ICapTransaction.MongoDB.cs
View file @
b3aeb1a2
...
...
@@ -4,6 +4,7 @@
using
System.Diagnostics
;
using
System.Threading
;
using
System.Threading.Tasks
;
using
DotNetCore.CAP.Transport
;
using
Microsoft.Extensions.DependencyInjection
;
using
MongoDB.Driver
;
...
...
src/DotNetCore.CAP.MySql/ICapTransaction.MySql.cs
View file @
b3aeb1a2
...
...
@@ -5,6 +5,7 @@ using System.Data;
using
System.Diagnostics
;
using
System.Threading
;
using
System.Threading.Tasks
;
using
DotNetCore.CAP.Transport
;
using
Microsoft.EntityFrameworkCore.Infrastructure
;
using
Microsoft.EntityFrameworkCore.Storage
;
using
Microsoft.Extensions.DependencyInjection
;
...
...
src/DotNetCore.CAP.PostgreSql/ICapTransaction.PostgreSql.cs
View file @
b3aeb1a2
...
...
@@ -5,6 +5,7 @@ using System.Data;
using
System.Diagnostics
;
using
System.Threading
;
using
System.Threading.Tasks
;
using
DotNetCore.CAP.Transport
;
using
Microsoft.EntityFrameworkCore.Infrastructure
;
using
Microsoft.EntityFrameworkCore.Storage
;
using
Microsoft.Extensions.DependencyInjection
;
...
...
src/DotNetCore.CAP.RabbitMQ/RabbitMQConsumerClient.cs
View file @
b3aeb1a2
...
...
@@ -6,6 +6,7 @@ using System.Collections.Generic;
using
System.Text
;
using
System.Threading
;
using
DotNetCore.CAP.Messages
;
using
DotNetCore.CAP.Transport
;
using
Microsoft.Extensions.Options
;
using
RabbitMQ.Client
;
using
RabbitMQ.Client.Events
;
...
...
src/DotNetCore.CAP.RabbitMQ/RabbitMQConsumerClientFactory.cs
View file @
b3aeb1a2
// Copyright (c) .NET Core Community. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
using
DotNetCore.CAP.Transport
;
using
Microsoft.Extensions.Options
;
namespace
DotNetCore.CAP.RabbitMQ
...
...
src/DotNetCore.CAP.SqlServer/Diagnostics/DiagnosticObserver.cs
View file @
b3aeb1a2
...
...
@@ -6,6 +6,7 @@ using System.Collections.Concurrent;
using
System.Collections.Generic
;
using
System.Reflection
;
using
DotNetCore.CAP.Persistence
;
using
DotNetCore.CAP.Transport
;
using
Microsoft.Data.SqlClient
;
namespace
DotNetCore.CAP.SqlServer.Diagnostics
...
...
src/DotNetCore.CAP.SqlServer/Diagnostics/DiagnosticProcessorObserver.cs
View file @
b3aeb1a2
...
...
@@ -6,6 +6,7 @@ using System.Collections.Concurrent;
using
System.Collections.Generic
;
using
System.Diagnostics
;
using
DotNetCore.CAP.Persistence
;
using
DotNetCore.CAP.Transport
;
namespace
DotNetCore.CAP.SqlServer.Diagnostics
{
...
...
src/DotNetCore.CAP.SqlServer/ICapTransaction.SqlServer.cs
View file @
b3aeb1a2
...
...
@@ -9,6 +9,7 @@ using System.Threading.Tasks;
using
DotNetCore.CAP.Internal
;
using
DotNetCore.CAP.Persistence
;
using
DotNetCore.CAP.SqlServer.Diagnostics
;
using
DotNetCore.CAP.Transport
;
using
Microsoft.Data.SqlClient
;
using
Microsoft.EntityFrameworkCore
;
using
Microsoft.EntityFrameworkCore.Infrastructure
;
...
...
src/DotNetCore.CAP/Abstractions/IModelBinderFactory.cs
deleted
100644 → 0
View file @
9f84d7bf
// 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.Reflection
;
using
DotNetCore.CAP.Abstractions.ModelBinding
;
namespace
DotNetCore.CAP.Abstractions
{
/// <summary>
/// Model binder factory.
/// </summary>
public
interface
IModelBinderFactory
{
/// <summary>
/// Create a model binder by parameter.
/// </summary>
/// <param name="parameter">The method parameter info</param>
/// <returns>A model binder instance.</returns>
IModelBinder
CreateBinder
(
ParameterInfo
parameter
);
}
}
\ No newline at end of file
src/DotNetCore.CAP/Abstractions/ModelBinding/IModelBinder.cs
deleted
100644 → 0
View file @
9f84d7bf
// 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.Tasks
;
namespace
DotNetCore.CAP.Abstractions.ModelBinding
{
/// <summary>
/// Defines an interface for model binders.
/// </summary>
public
interface
IModelBinder
{
Task
<
ModelBindingResult
>
BindModelAsync
(
string
content
);
}
}
\ No newline at end of file
src/DotNetCore.CAP/Abstractions/ModelBinding/ModelBindingResult.cs
deleted
100644 → 0
View file @
9f84d7bf
// Copyright (c) .NET Core Community. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
using
DotNetCore.CAP.Internal
;
namespace
DotNetCore.CAP.Abstractions.ModelBinding
{
/// <summary>
/// Contains the result of model binding.
/// </summary>
public
struct
ModelBindingResult
{
/// <summary>
/// Creates a <see cref="ModelBindingResult" /> representing a failed model binding operation.
/// </summary>
/// <returns>A <see cref="ModelBindingResult" /> representing a failed model binding operation.</returns>
public
static
ModelBindingResult
Failed
()
{
return
new
ModelBindingResult
(
null
,
false
);
}
/// <summary>
/// Creates a <see cref="ModelBindingResult" /> representing a successful model binding operation.
/// </summary>
/// <param name="model">The model value. May be <c>null.</c></param>
/// <returns>A <see cref="ModelBindingResult" /> representing a successful model bind.</returns>
public
static
ModelBindingResult
Success
(
object
model
)
{
return
new
ModelBindingResult
(
model
,
true
);
}
private
ModelBindingResult
(
object
model
,
bool
isSuccess
)
{
Model
=
model
;
IsSuccess
=
isSuccess
;
}
/// <summary>
/// Gets the model associated with this context.
/// </summary>
public
object
Model
{
get
;
}
public
bool
IsSuccess
{
get
;
}
public
override
string
ToString
()
{
if
(
IsSuccess
)
{
return
$"Success '
{
Model
}
'"
;
}
return
"Failed"
;
}
public
override
bool
Equals
(
object
obj
)
{
var
other
=
obj
as
ModelBindingResult
?;
if
(
other
==
null
)
{
return
false
;
}
return
Equals
(
other
.
Value
);
}
public
override
int
GetHashCode
()
{
var
hashCodeCombiner
=
HashCodeCombiner
.
Start
();
hashCodeCombiner
.
Add
(
IsSuccess
);
hashCodeCombiner
.
Add
(
Model
);
return
hashCodeCombiner
.
CombinedHash
;
}
public
bool
Equals
(
ModelBindingResult
other
)
{
return
IsSuccess
==
other
.
IsSuccess
&&
Equals
(
Model
,
other
.
Model
);
}
/// <summary>
/// Compares <see cref="ModelBindingResult" /> objects for equality.
/// </summary>
/// <param name="x">A <see cref="ModelBindingResult" />.</param>
/// <param name="y">A <see cref="ModelBindingResult" />.</param>
/// <returns><c>true</c> if the objects are equal, otherwise <c>false</c>.</returns>
public
static
bool
operator
==(
ModelBindingResult
x
,
ModelBindingResult
y
)
{
return
x
.
Equals
(
y
);
}
/// <summary>
/// Compares <see cref="ModelBindingResult" /> objects for inequality.
/// </summary>
/// <param name="x">A <see cref="ModelBindingResult" />.</param>
/// <param name="y">A <see cref="ModelBindingResult" />.</param>
/// <returns><c>true</c> if the objects are not equal, otherwise <c>false</c>.</returns>
public
static
bool
operator
!=(
ModelBindingResult
x
,
ModelBindingResult
y
)
{
return
!
x
.
Equals
(
y
);
}
}
}
\ No newline at end of file
src/DotNetCore.CAP/CAP.Attribute.cs
View file @
b3aeb1a2
...
...
@@ -4,7 +4,7 @@
using
System
;
using
System.Collections.Generic
;
using
System.Collections.ObjectModel
;
using
DotNetCore.CAP.
Abstractions
;
using
DotNetCore.CAP.
Internal
;
// ReSharper disable once CheckNamespace
namespace
DotNetCore.CAP
...
...
src/DotNetCore.CAP/CAP.Builder.cs
View file @
b3aeb1a2
...
...
@@ -2,7 +2,6 @@
// Licensed under the MIT License. See License.txt in the project root for license information.
using
System
;
using
DotNetCore.CAP.Abstractions
;
using
Microsoft.Extensions.DependencyInjection
;
namespace
DotNetCore.CAP
...
...
src/DotNetCore.CAP/CAP.ServiceCollectionExtensions.cs
View file @
b3aeb1a2
...
...
@@ -3,10 +3,10 @@
using
System
;
using
DotNetCore.CAP
;
using
DotNetCore.CAP.Abstractions
;
using
DotNetCore.CAP.Internal
;
using
DotNetCore.CAP.Processor
;
using
DotNetCore.CAP.Serialization
;
using
DotNetCore.CAP.Transport
;
using
Microsoft.Extensions.DependencyInjection.Extensions
;
// ReSharper disable once CheckNamespace
...
...
src/DotNetCore.CAP/ICapTransaction.Base.cs
View file @
b3aeb1a2
...
...
@@ -2,6 +2,7 @@
using
System.Threading
;
using
System.Threading.Tasks
;
using
DotNetCore.CAP.Persistence
;
using
DotNetCore.CAP.Transport
;
namespace
DotNetCore.CAP
{
...
...
src/DotNetCore.CAP/ConsumerExecutorDescriptor.cs
→
src/DotNetCore.CAP/
Internal/
ConsumerExecutorDescriptor.cs
View file @
b3aeb1a2
...
...
@@ -4,9 +4,8 @@
using
System
;
using
System.Collections.Generic
;
using
System.Reflection
;
using
DotNetCore.CAP.Abstractions
;
namespace
DotNetCore.CAP
namespace
DotNetCore.CAP
.Internal
{
/// <summary>
/// A descriptor of user definition method.
...
...
src/DotNetCore.CAP/Internal/ConsumerInvokerFactory.cs
View file @
b3aeb1a2
...
...
@@ -2,7 +2,6 @@
// Licensed under the MIT License. See License.txt in the project root for license information.
using
System
;
using
DotNetCore.CAP.Abstractions
;
using
Microsoft.Extensions.Logging
;
namespace
DotNetCore.CAP.Internal
...
...
src/DotNetCore.CAP/IBootstrapper.Default.cs
→
src/DotNetCore.CAP/I
nternal/I
Bootstrapper.Default.cs
View file @
b3aeb1a2
...
...
@@ -9,10 +9,10 @@ using DotNetCore.CAP.Persistence;
using
Microsoft.Extensions.Hosting
;
using
Microsoft.Extensions.Logging
;
namespace
DotNetCore.CAP
namespace
DotNetCore.CAP
.Internal
{
/// <summary>
/// Default implement of <see cref="T:DotNetCore.CAP.IBootstrapper" />.
/// Default implement of <see cref="T:DotNetCore.CAP.I
nternal.I
Bootstrapper" />.
/// </summary>
internal
class
DefaultBootstrapper
:
BackgroundService
,
IBootstrapper
{
...
...
src/DotNetCore.CAP/IBootstrapper.cs
→
src/DotNetCore.CAP/I
nternal/I
Bootstrapper.cs
View file @
b3aeb1a2
...
...
@@ -4,7 +4,7 @@
using
System.Threading
;
using
System.Threading.Tasks
;
namespace
DotNetCore.CAP
namespace
DotNetCore.CAP
.Internal
{
/// <summary>
/// Represents bootstrapping logic. For example, adding initial state to the storage or querying certain entities.
...
...
src/DotNetCore.CAP/
Abstractions/CapPublisher
.cs
→
src/DotNetCore.CAP/
Internal/ICapPublisher.Default
.cs
View file @
b3aeb1a2
...
...
@@ -7,14 +7,14 @@ using System.Diagnostics;
using
System.Threading
;
using
System.Threading.Tasks
;
using
DotNetCore.CAP.Diagnostics
;
using
DotNetCore.CAP.Internal
;
using
DotNetCore.CAP.Messages
;
using
DotNetCore.CAP.Persistence
;
using
DotNetCore.CAP.Transport
;
using
Microsoft.Extensions.DependencyInjection
;
namespace
DotNetCore.CAP.
Abstractions
namespace
DotNetCore.CAP.
Internal
{
public
class
CapPublisher
:
ICapPublisher
internal
class
CapPublisher
:
ICapPublisher
{
private
readonly
IDispatcher
_dispatcher
;
private
readonly
IDataStorage
_storage
;
...
...
src/DotNetCore.CAP/IConsumerRegister.Default.cs
→
src/DotNetCore.CAP/I
nternal/I
ConsumerRegister.Default.cs
View file @
b3aeb1a2
...
...
@@ -4,19 +4,17 @@
using
System
;
using
System.Diagnostics
;
using
System.Linq
;
using
System.Text
;
using
System.Text.Json
;
using
System.Threading
;
using
System.Threading.Tasks
;
using
DotNetCore.CAP.Diagnostics
;
using
DotNetCore.CAP.Internal
;
using
DotNetCore.CAP.Messages
;
using
DotNetCore.CAP.Persistence
;
using
DotNetCore.CAP.Serialization
;
using
DotNetCore.CAP.Transport
;
using
Microsoft.Extensions.Logging
;
using
Microsoft.Extensions.Options
;
namespace
DotNetCore.CAP
namespace
DotNetCore.CAP
.Internal
{
internal
class
ConsumerRegister
:
IConsumerRegister
{
...
...
src/DotNetCore.CAP/IConsumerRegister.cs
→
src/DotNetCore.CAP/I
nternal/I
ConsumerRegister.cs
View file @
b3aeb1a2
// Copyright (c) .NET Core Community. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
namespace
DotNetCore.CAP
namespace
DotNetCore.CAP
.Internal
{
/// <summary>
/// Handler received message of subscribed.
...
...
src/DotNetCore.CAP/IConsumerServiceSelector.Default.cs
→
src/DotNetCore.CAP/I
nternal/I
ConsumerServiceSelector.Default.cs
View file @
b3aeb1a2
This diff is collapsed.
Click to expand it.
src/DotNetCore.CAP/IConsumerServiceSelector.cs
→
src/DotNetCore.CAP/I
nternal/I
ConsumerServiceSelector.cs
View file @
b3aeb1a2
...
...
@@ -3,7 +3,7 @@
using
System.Collections.Generic
;
namespace
DotNetCore.CAP
namespace
DotNetCore.CAP
.Internal
{
/// <summary>
/// Defines an interface for selecting an consumer service method to invoke for the current message.
...
...
src/DotNetCore.CAP/
Abstractions
/IMongoTransaction.cs
→
src/DotNetCore.CAP/
Internal
/IMongoTransaction.cs
View file @
b3aeb1a2
...
...
@@ -4,7 +4,7 @@
using
System
;
using
System.Threading.Tasks
;
namespace
DotNetCore.CAP.
Abstractions
namespace
DotNetCore.CAP.
Internal
{
public
interface
IMongoTransaction
:
IDisposable
{
...
...
@@ -14,8 +14,8 @@ namespace DotNetCore.CAP.Abstractions
/// <value></value>
bool
AutoCommit
{
get
;
set
;
}
Task
<
IMongoTransaction
>
Beg
e
inAsync
(
bool
autoCommit
=
true
);
Task
<
IMongoTransaction
>
BeginAsync
(
bool
autoCommit
=
true
);
IMongoTransaction
Beg
e
in
(
bool
autoCommit
=
true
);
IMongoTransaction
Begin
(
bool
autoCommit
=
true
);
}
}
\ No newline at end of file
src/DotNetCore.CAP/IProcessingServer.cs
→
src/DotNetCore.CAP/I
nternal/I
ProcessingServer.cs
View file @
b3aeb1a2
...
...
@@ -3,7 +3,7 @@
using
System
;
namespace
DotNetCore.CAP
namespace
DotNetCore.CAP
.Internal
{
/// <inheritdoc />
/// <summary>
...
...
src/DotNetCore.CAP/I
Subscribe
Executor.Default.cs
→
src/DotNetCore.CAP/I
nternal/ISubscriber
Executor.Default.cs
View file @
b3aeb1a2
...
...
@@ -7,15 +7,14 @@ using System.Diagnostics;
using
System.Threading
;
using
System.Threading.Tasks
;
using
DotNetCore.CAP.Diagnostics
;
using
DotNetCore.CAP.Internal
;
using
DotNetCore.CAP.Messages
;
using
DotNetCore.CAP.Persistence
;
using
DotNetCore.CAP.Processor
;
using
Microsoft.Extensions.DependencyInjection
;
using
Microsoft.Extensions.Logging
;
using
Microsoft.Extensions.Options
;
using
Microsoft.Extensions.DependencyInjection
;
namespace
DotNetCore.CAP
namespace
DotNetCore.CAP
.Internal
{
internal
class
DefaultSubscriberExecutor
:
ISubscriberExecutor
{
...
...
src/DotNetCore.CAP/ISubscriberExecutor.cs
→
src/DotNetCore.CAP/I
nternal/I
SubscriberExecutor.cs
View file @
b3aeb1a2
...
...
@@ -5,7 +5,7 @@ using System.Threading;
using
System.Threading.Tasks
;
using
DotNetCore.CAP.Persistence
;
namespace
DotNetCore.CAP
namespace
DotNetCore.CAP
.Internal
{
/// <summary>
/// Consumer executor
...
...
src/DotNetCore.CAP/Internal/LoggerExtensions.cs
View file @
b3aeb1a2
...
...
@@ -5,7 +5,7 @@ using System;
using
System.Diagnostics.CodeAnalysis
;
using
Microsoft.Extensions.Logging
;
namespace
DotNetCore.CAP
namespace
DotNetCore.CAP
.Internal
{
[
SuppressMessage
(
"ReSharper"
,
"InconsistentNaming"
)]
internal
static
class
LoggerExtensions
...
...
src/DotNetCore.CAP/
Abstractions
/TopicAttribute.cs
→
src/DotNetCore.CAP/
Internal
/TopicAttribute.cs
View file @
b3aeb1a2
...
...
@@ -3,7 +3,7 @@
using
System
;
namespace
DotNetCore.CAP.
Abstractions
namespace
DotNetCore.CAP.
Internal
{
/// <inheritdoc />
/// <summary>
...
...
src/DotNetCore.CAP/Monitoring/MessageQueryDto.cs
View file @
b3aeb1a2
...
...
@@ -10,6 +10,7 @@ namespace DotNetCore.CAP.Monitoring
public
MessageType
MessageType
{
get
;
set
;
}
public
string
Group
{
get
;
set
;
}
public
string
Name
{
get
;
set
;
}
public
string
Content
{
get
;
set
;
}
...
...
src/DotNetCore.CAP/Processor/IDispatcher.Default.cs
View file @
b3aeb1a2
...
...
@@ -7,6 +7,7 @@ using System.Threading;
using
System.Threading.Tasks
;
using
DotNetCore.CAP.Internal
;
using
DotNetCore.CAP.Persistence
;
using
DotNetCore.CAP.Transport
;
using
Microsoft.Extensions.Logging
;
namespace
DotNetCore.CAP.Processor
...
...
src/DotNetCore.CAP/Processor/IProcessingServer.Cap.cs
View file @
b3aeb1a2
...
...
@@ -6,6 +6,7 @@ using System.Collections.Generic;
using
System.Linq
;
using
System.Threading
;
using
System.Threading.Tasks
;
using
DotNetCore.CAP.Internal
;
using
Microsoft.Extensions.DependencyInjection
;
using
Microsoft.Extensions.Logging
;
...
...
src/DotNetCore.CAP/Processor/IProcessor.TransportCheck.cs
View file @
b3aeb1a2
...
...
@@ -3,6 +3,7 @@
using
System
;
using
System.Threading.Tasks
;
using
DotNetCore.CAP.Internal
;
namespace
DotNetCore.CAP.Processor
{
...
...
src/DotNetCore.CAP/IConsumerClient.cs
→
src/DotNetCore.CAP/
Transport/
IConsumerClient.cs
View file @
b3aeb1a2
...
...
@@ -6,7 +6,7 @@ using System.Collections.Generic;
using
System.Threading
;
using
DotNetCore.CAP.Messages
;
namespace
DotNetCore.CAP
namespace
DotNetCore.CAP
.Transport
{
/// <inheritdoc />
/// <summary>
...
...
src/DotNetCore.CAP/IConsumerClientFactory.cs
→
src/DotNetCore.CAP/
Transport/
IConsumerClientFactory.cs
View file @
b3aeb1a2
// Copyright (c) .NET Core Community. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
namespace
DotNetCore.CAP
namespace
DotNetCore.CAP
.Transport
{
/// <summary>
/// Consumer client factory to create consumer client instance.
...
...
src/DotNetCore.CAP/IDispatcher.cs
→
src/DotNetCore.CAP/
Transport/
IDispatcher.cs
View file @
b3aeb1a2
// Copyright (c) .NET Core Community. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
using
DotNetCore.CAP.Internal
;
using
DotNetCore.CAP.Persistence
;
namespace
DotNetCore.CAP
namespace
DotNetCore.CAP
.Transport
{
public
interface
IDispatcher
{
...
...
src/DotNetCore.CAP/MqLogType.cs
→
src/DotNetCore.CAP/
Transport/
MqLogType.cs
View file @
b3aeb1a2
...
...
@@ -3,7 +3,7 @@
using
System
;
namespace
DotNetCore.CAP
namespace
DotNetCore.CAP
.Transport
{
public
enum
MqLogType
{
...
...
test/DotNetCore.CAP.Test/ModelBinderFactoryTest.cs
deleted
100644 → 0
View file @
9f84d7bf
using
System.Linq
;
using
System.Reflection
;
using
DotNetCore.CAP.Abstractions
;
using
DotNetCore.CAP.Internal
;
using
Moq
;
using
Xunit
;
namespace
DotNetCore.CAP.Test
{
public
class
ModelBinderFactoryTest
{
private
IModelBinderFactory
_factory
;
public
ModelBinderFactoryTest
()
{
var
serializer
=
Mock
.
Of
<
IContentSerializer
>();
_factory
=
new
ModelBinderFactory
(
serializer
);
}
[
Theory
]
[
InlineData
(
nameof
(
Sample
.
DateTimeParam
))]
[
InlineData
(
nameof
(
Sample
.
StringParam
))]
[
InlineData
(
nameof
(
Sample
.
IntegerParam
))]
[
InlineData
(
nameof
(
Sample
.
GuidParam
))]
[
InlineData
(
nameof
(
Sample
.
UriParam
))]
public
void
CreateSimpleTypeBinderTest
(
string
methodName
)
{
var
methodInfo
=
typeof
(
Sample
).
GetRuntimeMethods
().
Single
(
x
=>
x
.
Name
==
methodName
);
var
binder
=
_factory
.
CreateBinder
(
methodInfo
.
GetParameters
()[
0
]);
Assert
.
NotNull
(
binder
);
Assert
.
True
(
binder
is
SimpleTypeModelBinder
);
Assert
.
False
(
binder
is
ComplexTypeModelBinder
);
}
[
Theory
]
[
InlineData
(
nameof
(
Sample
.
ComplexTypeParam
))]
public
void
CreateComplexTypeBinderTest
(
string
methodName
)
{
var
methodInfo
=
typeof
(
Sample
).
GetRuntimeMethods
().
Single
(
x
=>
x
.
Name
==
methodName
);
var
binder
=
_factory
.
CreateBinder
(
methodInfo
.
GetParameters
()[
0
]);
Assert
.
NotNull
(
binder
);
Assert
.
False
(
binder
is
SimpleTypeModelBinder
);
Assert
.
True
(
binder
is
ComplexTypeModelBinder
);
}
}
}
\ No newline at end of file
test/DotNetCore.CAP.Test/SnowflakeIdTest.cs
View file @
b3aeb1a2
using
System.Linq
;
using
System.Threading.Tasks
;
using
DotNetCore.CAP.In
frastructure
;
using
DotNetCore.CAP.In
ternal
;
using
Xunit
;
namespace
DotNetCore.CAP.Test
...
...
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