Sfoglia il codice sorgente

modify class protected level

master
Savorboard 7 anni fa
parent
commit
32cfa4e787
15 ha cambiato i file con 27 aggiunte e 21 eliminazioni
  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 Vedi File

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


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

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

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


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

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



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

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

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


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

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

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

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

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

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


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

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

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


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

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

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

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



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

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


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

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

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

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

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


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

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

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



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

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

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


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

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

namespace DotNetCore.CAP.Internal
{
public class DefaultSubscriberExecutor : ISubscriberExecutor
internal class DefaultSubscriberExecutor : ISubscriberExecutor
{
private readonly ICallbackMessageSender _callbackMessageSender;
private readonly ILogger<DefaultSubscriberExecutor> _logger;
@@ -41,11 +42,11 @@ namespace DotNetCore.CAP.Internal
var executeDescriptor = executeDescriptorGroup[receivedMessage.Group][0];
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;
}
catch (Exception ex)


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

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

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



Caricamento…
Annulla
Salva