From d48c2d4f05f5d821af86eadec9116afb0e334a88 Mon Sep 17 00:00:00 2001 From: yangxiaodong Date: Mon, 17 Jul 2017 17:11:00 +0800 Subject: [PATCH] refactor. --- samples/Sample.Kafka/Controllers/ValuesController.cs | 4 +--- src/DotNetCore.CAP/Infrastructure/Helper.cs | 2 +- src/DotNetCore.CAP/Infrastructure/WebHookProvider.cs | 6 +++++- src/DotNetCore.CAP/Processor/IProcessingServer.Cap.cs | 5 ++--- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/samples/Sample.Kafka/Controllers/ValuesController.cs b/samples/Sample.Kafka/Controllers/ValuesController.cs index 8883225..13142a5 100644 --- a/samples/Sample.Kafka/Controllers/ValuesController.cs +++ b/samples/Sample.Kafka/Controllers/ValuesController.cs @@ -29,9 +29,7 @@ namespace Sample.Kafka.Controllers [CapSubscribe("zzwl.topic.finace.callBack", Group = "test")] public void KafkaTest(Person person) { - Console.WriteLine(person.Name); - Console.WriteLine(person.Age); - + Console.WriteLine(DateTime.Now); } [Route("~/send")] diff --git a/src/DotNetCore.CAP/Infrastructure/Helper.cs b/src/DotNetCore.CAP/Infrastructure/Helper.cs index a4c36e2..b3b6c29 100644 --- a/src/DotNetCore.CAP/Infrastructure/Helper.cs +++ b/src/DotNetCore.CAP/Infrastructure/Helper.cs @@ -6,7 +6,7 @@ namespace DotNetCore.CAP.Infrastructure { public static class Helper { - private static readonly DateTime Epoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc); + private static readonly DateTime Epoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Local); private static JsonSerializerSettings _serializerSettings; public static void SetSerializerSettings(JsonSerializerSettings setting) diff --git a/src/DotNetCore.CAP/Infrastructure/WebHookProvider.cs b/src/DotNetCore.CAP/Infrastructure/WebHookProvider.cs index 49039f6..d2492dd 100644 --- a/src/DotNetCore.CAP/Infrastructure/WebHookProvider.cs +++ b/src/DotNetCore.CAP/Infrastructure/WebHookProvider.cs @@ -4,7 +4,11 @@ using System.Text; namespace DotNetCore.CAP.Infrastructure { - class WebHookProvider + public class WebHookProvider { + public WebHookProvider() + { + throw new NotImplementedException(); + } } } diff --git a/src/DotNetCore.CAP/Processor/IProcessingServer.Cap.cs b/src/DotNetCore.CAP/Processor/IProcessingServer.Cap.cs index 8aae553..242eff7 100644 --- a/src/DotNetCore.CAP/Processor/IProcessingServer.Cap.cs +++ b/src/DotNetCore.CAP/Processor/IProcessingServer.Cap.cs @@ -59,10 +59,9 @@ namespace DotNetCore.CAP.Processor return; } - _logger.LogTrace("Pulsing the JobQueuer."); + _logger.LogTrace("Pulsing the Queuer."); - PublishQueuer.PulseEvent.Set(); - SubscribeQueuer.PulseEvent.Set(); + PublishQueuer.PulseEvent.Set(); } public void Dispose()