From 7e84a1537051c2df61ade239203a90d8854f0d29 Mon Sep 17 00:00:00 2001 From: yangxiaodong Date: Sun, 14 May 2017 16:55:38 +0800 Subject: [PATCH] refactor --- src/Cap.Consistency/Abstractions/ConsumerContext.cs | 9 +++++---- .../Abstractions/ConsumerExecutorDescriptor.cs | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/Cap.Consistency/Abstractions/ConsumerContext.cs b/src/Cap.Consistency/Abstractions/ConsumerContext.cs index 0959680..c61d9fe 100644 --- a/src/Cap.Consistency/Abstractions/ConsumerContext.cs +++ b/src/Cap.Consistency/Abstractions/ConsumerContext.cs @@ -2,19 +2,20 @@ using System.Collections.Generic; using System.Text; using System.Threading.Tasks; +using Cap.Consistency.Infrastructure; namespace Cap.Consistency.Abstractions { - public class ConsumerContext { - public ConsumerContext(ConsumerExecutorDescriptor descriptor) { + public ConsumerContext(ConsumerExecutorDescriptor descriptor, DeliverMessage message) { + ConsumerDescriptor = descriptor ?? throw new ArgumentNullException(nameof(descriptor)); + DeliverMessage = message ?? throw new ArgumentNullException(nameof(message)); } public ConsumerExecutorDescriptor ConsumerDescriptor { get; set; } - - + public DeliverMessage DeliverMessage { get; set; } } } diff --git a/src/Cap.Consistency/Abstractions/ConsumerExecutorDescriptor.cs b/src/Cap.Consistency/Abstractions/ConsumerExecutorDescriptor.cs index a01ec63..d3a3d67 100644 --- a/src/Cap.Consistency/Abstractions/ConsumerExecutorDescriptor.cs +++ b/src/Cap.Consistency/Abstractions/ConsumerExecutorDescriptor.cs @@ -9,10 +9,10 @@ namespace Cap.Consistency.Abstractions { public MethodInfo MethodInfo { get; set; } - public Type ImplType { get; set; } + public TypeInfo ImplTypeInfo { get; set; } public TopicInfo Topic { get; set; } - public int GroupId { get; set; } + public string GroupId { get; set; } } }