Commit 323abb7f authored by Savorboard's avatar Savorboard

remove some class from Abstraction namespce to Internal.

parent cb850506
using System;
namespace DotNetCore.CAP.Abstractions
{
/// <summary>
/// a context of consumer invoker.
/// </summary>
public class ConsumerInvokerContext
{
public ConsumerInvokerContext(ConsumerContext consumerContext)
{
ConsumerContext = consumerContext ??
throw new ArgumentNullException(nameof(consumerContext));
}
public ConsumerContext ConsumerContext { get; set; }
public IConsumerInvoker Result { get; set; }
}
}
\ No newline at end of file
using System; using System;
namespace DotNetCore.CAP.Abstractions 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.
......
using System;
using System.Collections.Generic;
using System.Text;
namespace DotNetCore.CAP.Internal
{
public class ConsumerExecutedResult
{
public ConsumerExecutedResult(object result, string msgId, string callbackName)
{
Result = result;
MessageId = msgId;
CallbackName = callbackName;
}
public object Result { get; set; }
public string MessageId { get; set; }
public string CallbackName { get; set; }
}
}
using System.Reflection; using System.Reflection;
using DotNetCore.CAP.Abstractions;
namespace DotNetCore.CAP.Abstractions namespace DotNetCore.CAP.Internal
{ {
/// <summary> /// <summary>
/// A descriptor of user definition method. /// A descriptor of user definition method.
......
using System.Threading.Tasks; using System.Threading.Tasks;
using DotNetCore.CAP.Abstractions;
namespace DotNetCore.CAP.Abstractions namespace DotNetCore.CAP.Internal
{ {
/// <summary> /// <summary>
/// Perform user definition method of consumers. /// Perform user definition method of consumers.
...@@ -8,8 +9,9 @@ namespace DotNetCore.CAP.Abstractions ...@@ -8,8 +9,9 @@ namespace DotNetCore.CAP.Abstractions
public interface IConsumerInvoker public interface IConsumerInvoker
{ {
/// <summary> /// <summary>
/// begin to invoke method. /// Invoke consumer method whit consumer context.
/// </summary> /// </summary>
Task InvokeAsync(); /// <param name="context">consumer execute context</param>
Task<ConsumerExecutedResult> InvokeAsync(ConsumerContext context);
} }
} }
\ No newline at end of file
using System.Collections.Generic; using System.Collections.Generic;
namespace DotNetCore.CAP.Abstractions 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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment