Browse Source

modify class protected level

master
Savorboard 7 years ago
parent
commit
32cfa4e787
15 changed files with 27 additions and 21 deletions
  1. +1
    -1
      src/DotNetCore.CAP/Internal/ConsumerContext.cs
  2. +1
    -1
      src/DotNetCore.CAP/Internal/ConsumerExecutedResult.cs
  3. +1
    -1
      src/DotNetCore.CAP/Internal/ConsumerExecutorDescriptor.cs
  4. +1
    -1
      src/DotNetCore.CAP/Internal/ConsumerInvokerFactory.cs
  5. +1
    -1
      src/DotNetCore.CAP/Internal/ICallbackMessageSender.cs
  6. +1
    -1
      src/DotNetCore.CAP/Internal/IConsumerInvoker.Default.cs
  7. +1
    -2
      src/DotNetCore.CAP/Internal/IConsumerInvoker.cs
  8. +1
    -1
      src/DotNetCore.CAP/Internal/IConsumerInvokerFactory.cs
  9. +1
    -1
      src/DotNetCore.CAP/Internal/IConsumerServiceSelector.Default.cs
  10. +1
    -1
      src/DotNetCore.CAP/Internal/IConsumerServiceSelector.cs
  11. +8
    -2
      src/DotNetCore.CAP/Internal/IContentSerializer.Json.cs
  12. +1
    -1
      src/DotNetCore.CAP/Internal/IMessagePacker.Default.cs
  13. +1
    -1
      src/DotNetCore.CAP/Internal/IModelBinder.SimpleType.cs
  14. +6
    -5
      src/DotNetCore.CAP/Internal/ISubscriberExecutor.Default.cs
  15. +1
    -1
      src/DotNetCore.CAP/Internal/MethodMatcherCache.cs

+ 1
- 1
src/DotNetCore.CAP/Internal/ConsumerContext.cs View File

@@ -5,7 +5,7 @@ namespace DotNetCore.CAP.Internal
/// <summary> /// <summary>
/// A context for consumers, it used to be provider wrapper of method description and received message. /// A context for consumers, it used to be provider wrapper of method description and received message.
/// </summary> /// </summary>
public class ConsumerContext
internal class ConsumerContext
{ {
/// <summary> /// <summary>
/// create a new instance of <see cref="ConsumerContext" /> . /// create a new instance of <see cref="ConsumerContext" /> .


+ 1
- 1
src/DotNetCore.CAP/Internal/ConsumerExecutedResult.cs View File

@@ -4,7 +4,7 @@ using System.Text;


namespace DotNetCore.CAP.Internal namespace DotNetCore.CAP.Internal
{ {
public class ConsumerExecutedResult
internal class ConsumerExecutedResult
{ {
public ConsumerExecutedResult(object result, string msgId, string callbackName) public ConsumerExecutedResult(object result, string msgId, string callbackName)
{ {


+ 1
- 1
src/DotNetCore.CAP/Internal/ConsumerExecutorDescriptor.cs View File

@@ -6,7 +6,7 @@ namespace DotNetCore.CAP.Internal
/// <summary> /// <summary>
/// A descriptor of user definition method. /// A descriptor of user definition method.
/// </summary> /// </summary>
public class ConsumerExecutorDescriptor
internal class ConsumerExecutorDescriptor
{ {
public MethodInfo MethodInfo { get; set; } public MethodInfo MethodInfo { get; set; }




+ 1
- 1
src/DotNetCore.CAP/Internal/ConsumerInvokerFactory.cs View File

@@ -4,7 +4,7 @@ using Microsoft.Extensions.Logging;


namespace DotNetCore.CAP.Internal namespace DotNetCore.CAP.Internal
{ {
public class ConsumerInvokerFactory : IConsumerInvokerFactory
internal class ConsumerInvokerFactory : IConsumerInvokerFactory
{ {
private readonly ILogger _logger; private readonly ILogger _logger;
private readonly IMessagePacker _messagePacker; private readonly IMessagePacker _messagePacker;


+ 1
- 1
src/DotNetCore.CAP/Internal/ICallbackMessageSender.cs View File

@@ -2,7 +2,7 @@


namespace DotNetCore.CAP.Internal namespace DotNetCore.CAP.Internal
{ {
public interface ICallbackMessageSender
internal interface ICallbackMessageSender
{ {
Task SendAsync(string messageId, string topicName, object bodyObj); Task SendAsync(string messageId, string topicName, object bodyObj);
} }

+ 1
- 1
src/DotNetCore.CAP/Internal/IConsumerInvoker.Default.cs View File

@@ -7,7 +7,7 @@ using Microsoft.Extensions.Logging;


namespace DotNetCore.CAP.Internal namespace DotNetCore.CAP.Internal
{ {
public class DefaultConsumerInvoker : IConsumerInvoker
internal class DefaultConsumerInvoker : IConsumerInvoker
{ {
private readonly ILogger _logger; private readonly ILogger _logger;
private readonly IModelBinderFactory _modelBinderFactory; private readonly IModelBinderFactory _modelBinderFactory;


+ 1
- 2
src/DotNetCore.CAP/Internal/IConsumerInvoker.cs View File

@@ -1,12 +1,11 @@
using System.Threading.Tasks; using System.Threading.Tasks;
using DotNetCore.CAP.Abstractions;


namespace DotNetCore.CAP.Internal namespace DotNetCore.CAP.Internal
{ {
/// <summary> /// <summary>
/// Perform user definition method of consumers. /// Perform user definition method of consumers.
/// </summary> /// </summary>
public interface IConsumerInvoker
internal interface IConsumerInvoker
{ {
/// <summary> /// <summary>
/// Invoke consumer method whit consumer context. /// Invoke consumer method whit consumer context.


+ 1
- 1
src/DotNetCore.CAP/Internal/IConsumerInvokerFactory.cs View File

@@ -1,6 +1,6 @@
namespace DotNetCore.CAP.Internal namespace DotNetCore.CAP.Internal
{ {
public interface IConsumerInvokerFactory
internal interface IConsumerInvokerFactory
{ {
IConsumerInvoker CreateInvoker(); IConsumerInvoker CreateInvoker();
} }

+ 1
- 1
src/DotNetCore.CAP/Internal/IConsumerServiceSelector.Default.cs View File

@@ -12,7 +12,7 @@ namespace DotNetCore.CAP.Internal
/// <summary> /// <summary>
/// A default <see cref="T:DotNetCore.CAP.Abstractions.IConsumerServiceSelector" /> implementation. /// A default <see cref="T:DotNetCore.CAP.Abstractions.IConsumerServiceSelector" /> implementation.
/// </summary> /// </summary>
public class DefaultConsumerServiceSelector : IConsumerServiceSelector
internal class DefaultConsumerServiceSelector : IConsumerServiceSelector
{ {
private readonly IServiceProvider _serviceProvider; private readonly IServiceProvider _serviceProvider;




+ 1
- 1
src/DotNetCore.CAP/Internal/IConsumerServiceSelector.cs View File

@@ -5,7 +5,7 @@ namespace DotNetCore.CAP.Internal
/// <summary> /// <summary>
/// Defines an interface for selecting an consumer service method to invoke for the current message. /// Defines an interface for selecting an consumer service method to invoke for the current message.
/// </summary> /// </summary>
public interface IConsumerServiceSelector
internal interface IConsumerServiceSelector
{ {
/// <summary> /// <summary>
/// Selects a set of <see cref="ConsumerExecutorDescriptor" /> candidates for the current message associated with /// Selects a set of <see cref="ConsumerExecutorDescriptor" /> candidates for the current message associated with


+ 8
- 2
src/DotNetCore.CAP/Internal/IContentSerializer.Json.cs View File

@@ -1,15 +1,21 @@
using DotNetCore.CAP.Abstractions;
using System;
using DotNetCore.CAP.Abstractions;
using DotNetCore.CAP.Infrastructure; using DotNetCore.CAP.Infrastructure;


namespace DotNetCore.CAP.Internal namespace DotNetCore.CAP.Internal
{ {
public class JsonContentSerializer : IContentSerializer
internal class JsonContentSerializer : IContentSerializer
{ {
public T DeSerialize<T>(string messageObjStr) public T DeSerialize<T>(string messageObjStr)
{ {
return Helper.FromJson<T>(messageObjStr); return Helper.FromJson<T>(messageObjStr);
} }


public object DeSerialize(string content, Type type)
{
return Helper.FromJson(content, type);
}

public string Serialize<T>(T messageObj) public string Serialize<T>(T messageObj)
{ {
return Helper.ToJson(messageObj); return Helper.ToJson(messageObj);


+ 1
- 1
src/DotNetCore.CAP/Internal/IMessagePacker.Default.cs View File

@@ -3,7 +3,7 @@ using DotNetCore.CAP.Models;


namespace DotNetCore.CAP.Internal namespace DotNetCore.CAP.Internal
{ {
public class DefaultMessagePacker : IMessagePacker
internal class DefaultMessagePacker : IMessagePacker
{ {
private readonly IContentSerializer _serializer; private readonly IContentSerializer _serializer;




+ 1
- 1
src/DotNetCore.CAP/Internal/IModelBinder.SimpleType.cs View File

@@ -8,7 +8,7 @@ using DotNetCore.CAP.Abstractions.ModelBinding;


namespace DotNetCore.CAP.Internal namespace DotNetCore.CAP.Internal
{ {
public class SimpleTypeModelBinder : IModelBinder
internal class SimpleTypeModelBinder : IModelBinder
{ {
private readonly ParameterInfo _parameterInfo; private readonly ParameterInfo _parameterInfo;
private readonly TypeConverter _typeConverter; private readonly TypeConverter _typeConverter;


+ 6
- 5
src/DotNetCore.CAP/Internal/ISubscriberExecutor.Default.cs View File

@@ -1,11 +1,12 @@
using System; using System;
using System.Threading.Tasks; using System.Threading.Tasks;
using DotNetCore.CAP.Abstractions;
using DotNetCore.CAP.Models; using DotNetCore.CAP.Models;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;


namespace DotNetCore.CAP.Internal namespace DotNetCore.CAP.Internal
{ {
public class DefaultSubscriberExecutor : ISubscriberExecutor
internal class DefaultSubscriberExecutor : ISubscriberExecutor
{ {
private readonly ICallbackMessageSender _callbackMessageSender; private readonly ICallbackMessageSender _callbackMessageSender;
private readonly ILogger<DefaultSubscriberExecutor> _logger; private readonly ILogger<DefaultSubscriberExecutor> _logger;
@@ -41,11 +42,11 @@ namespace DotNetCore.CAP.Internal
var executeDescriptor = executeDescriptorGroup[receivedMessage.Group][0]; var executeDescriptor = executeDescriptorGroup[receivedMessage.Group][0];
var consumerContext = new ConsumerContext(executeDescriptor, receivedMessage.ToMessageContext()); var consumerContext = new ConsumerContext(executeDescriptor, receivedMessage.ToMessageContext());


var ret = await Invoker.InvokeAsync(consumerContext);
var ret = await Invoker.InvokeAsync(consumerContext);

if (!string.IsNullOrEmpty(ret.CallbackName))
await _callbackMessageSender.SendAsync(ret.MessageId, ret.CallbackName, ret.Result);


if (!string.IsNullOrEmpty(ret.CallbackName))
await _callbackMessageSender.SendAsync(ret.MessageId,ret.CallbackName,ret.Result);
return OperateResult.Success; return OperateResult.Success;
} }
catch (Exception ex) catch (Exception ex)


+ 1
- 1
src/DotNetCore.CAP/Internal/MethodMatcherCache.cs View File

@@ -6,7 +6,7 @@ using DotNetCore.CAP.Abstractions;


namespace DotNetCore.CAP.Internal namespace DotNetCore.CAP.Internal
{ {
public class MethodMatcherCache
internal class MethodMatcherCache
{ {
private readonly IConsumerServiceSelector _selector; private readonly IConsumerServiceSelector _selector;




Loading…
Cancel
Save