Commit 2b90afd9 authored by Savorboard's avatar Savorboard

cleanup code.

parent 39e1b310
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<PackageReference Include="Dapper" Version="1.50.2" /> <PackageReference Include="Dapper" Version="1.50.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.0.0" /> <PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="2.0.0" /> <PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="2.0.0" />
<PackageReference Include="MySqlConnector" Version="0.26.5" /> <PackageReference Include="MySqlConnector" Version="0.27.0" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
......
...@@ -43,7 +43,7 @@ namespace DotNetCore.CAP.Abstractions.ModelBinding ...@@ -43,7 +43,7 @@ namespace DotNetCore.CAP.Abstractions.ModelBinding
{ {
if (IsSuccess) if (IsSuccess)
return $"Success '{Model}'"; return $"Success '{Model}'";
return $"Failed"; return "Failed";
} }
public override bool Equals(object obj) public override bool Equals(object obj)
......
...@@ -13,6 +13,8 @@ namespace DotNetCore.CAP ...@@ -13,6 +13,8 @@ namespace DotNetCore.CAP
/// Cache is thread safe and will delete expired entries on its own using System.Threading.Timers (which run on /// Cache is thread safe and will delete expired entries on its own using System.Threading.Timers (which run on
/// <see cref="ThreadPool" /> threads). /// <see cref="ThreadPool" /> threads).
/// </summary> /// </summary>
// ReSharper disable once InheritdocConsiderUsage
// ReSharper disable once InconsistentNaming
public class Cache<K, T> : IDisposable public class Cache<K, T> : IDisposable
{ {
#region Constructor and class members #region Constructor and class members
......
...@@ -150,9 +150,6 @@ ...@@ -150,9 +150,6 @@
<data name="Common_MoreDetails" xml:space="preserve"> <data name="Common_MoreDetails" xml:space="preserve">
<value>更多...</value> <value>更多...</value>
</data> </data>
<data name="Common_NotAvailable" xml:space="preserve">
<value>N/A</value>
</data>
<data name="Common_PeriodDay" xml:space="preserve"> <data name="Common_PeriodDay" xml:space="preserve">
<value></value> <value></value>
</data> </data>
...@@ -213,27 +210,6 @@ ...@@ -213,27 +210,6 @@
<data name="PerPageSelector_ItemsPerPage" xml:space="preserve"> <data name="PerPageSelector_ItemsPerPage" xml:space="preserve">
<value>每页条数</value> <value>每页条数</value>
</data> </data>
<data name="QueuesPage_NoJobs" xml:space="preserve">
<value>没有作业</value>
</data>
<data name="QueuesPage_NoQueues" xml:space="preserve">
<value>队列中不存在。尝试添加作业到队列</value>
</data>
<data name="QueuesPage_Table_Length" xml:space="preserve">
<value>长度</value>
</data>
<data name="QueuesPage_Table_NextsJobs" xml:space="preserve">
<value>下一个作业</value>
</data>
<data name="QueuesPage_Table_Queue" xml:space="preserve">
<value>队列</value>
</data>
<data name="QueuesPage_Title" xml:space="preserve">
<value>队列</value>
</data>
<data name="ServersPage_NoServers" xml:space="preserve">
<value>没有活动服务器。后台作业将不会被执行。</value>
</data>
<data name="ServersPage_Table_Heartbeat" xml:space="preserve"> <data name="ServersPage_Table_Heartbeat" xml:space="preserve">
<value>心跳</value> <value>心跳</value>
</data> </data>
...@@ -276,36 +252,18 @@ ...@@ -276,36 +252,18 @@
<data name="NavigationMenu_Servers" xml:space="preserve"> <data name="NavigationMenu_Servers" xml:space="preserve">
<value>服务器</value> <value>服务器</value>
</data> </data>
<data name="Common_CannotFindTargetMethod" xml:space="preserve">
<value>Can not find the target method.</value>
</data>
<data name="Common_Enqueued" xml:space="preserve"> <data name="Common_Enqueued" xml:space="preserve">
<value>队列</value> <value>队列</value>
</data> </data>
<data name="Common_NoState" xml:space="preserve">
<value>No state</value>
</data>
<data name="Metrics_ActiveConnections" xml:space="preserve">
<value>Active Connections</value>
</data>
<data name="Metrics_DeletedJobs" xml:space="preserve"> <data name="Metrics_DeletedJobs" xml:space="preserve">
<value>删除</value> <value>删除</value>
</data> </data>
<data name="Metrics_ProcessingJobs" xml:space="preserve">
<value>执行中</value>
</data>
<data name="Metrics_Servers" xml:space="preserve"> <data name="Metrics_Servers" xml:space="preserve">
<value>服务器</value> <value>服务器</value>
</data> </data>
<data name="Metrics_TotalConnections" xml:space="preserve"> <data name="Metrics_TotalConnections" xml:space="preserve">
<value>总连接数</value> <value>总连接数</value>
</data> </data>
<data name="Common_Condition" xml:space="preserve">
<value>Condition</value>
</data>
<data name="Common_Continuations" xml:space="preserve">
<value>Continuations</value>
</data>
<data name="Metrics_AwaitingCount" xml:space="preserve"> <data name="Metrics_AwaitingCount" xml:space="preserve">
<value>等待中</value> <value>等待中</value>
</data> </data>
...@@ -357,9 +315,6 @@ ...@@ -357,9 +315,6 @@
<data name="MessagesPage_Table_Retries" xml:space="preserve"> <data name="MessagesPage_Table_Retries" xml:space="preserve">
<value>重试次数</value> <value>重试次数</value>
</data> </data>
<data name="MesssagesPage_NoMessages" xml:space="preserve">
<value>没有消息</value>
</data>
<data name="PublishedPage_Title" xml:space="preserve"> <data name="PublishedPage_Title" xml:space="preserve">
<value>已发送消息</value> <value>已发送消息</value>
</data> </data>
......
...@@ -100,10 +100,10 @@ ...@@ -100,10 +100,10 @@
<Compile Update="Dashboard\Pages\PublishedPage.cs"> <Compile Update="Dashboard\Pages\PublishedPage.cs">
<DependentUpon>PublishedPage.cshtml</DependentUpon> <DependentUpon>PublishedPage.cshtml</DependentUpon>
</Compile> </Compile>
<Compile Update="Dashboard\Pages\PublishedPage1.generated.cs"> <Compile Update="Dashboard\Pages\PublishedPage*.cs">
<DependentUpon>PublishedPage.cshtml</DependentUpon> <DependentUpon>PublishedPage.cshtml</DependentUpon>
</Compile> </Compile>
<Compile Update="Dashboard\Pages\LayoutPage1.generated.cs"> <Compile Update="Dashboard\Pages\LayoutPage.*.cs">
<DependentUpon>LayoutPage.cshtml</DependentUpon> <DependentUpon>LayoutPage.cshtml</DependentUpon>
</Compile> </Compile>
<Compile Update="Dashboard\Pages\LayoutPage.cs"> <Compile Update="Dashboard\Pages\LayoutPage.cs">
...@@ -138,9 +138,4 @@ ...@@ -138,9 +138,4 @@
<LastGenOutput>Strings.Designer.cs</LastGenOutput> <LastGenOutput>Strings.Designer.cs</LastGenOutput>
</EmbeddedResource> </EmbeddedResource>
</ItemGroup> </ItemGroup>
<ItemGroup>
<None Update="Dashboard\Pages\HomePage.cshtml">
<Generator>RazorGenerator</Generator>
</None>
</ItemGroup>
</Project> </Project>
\ No newline at end of file
...@@ -6,7 +6,7 @@ using System.Security.Cryptography; ...@@ -6,7 +6,7 @@ using System.Security.Cryptography;
using System.Text; using System.Text;
using System.Threading; using System.Threading;
namespace DotNetCore.CAP namespace DotNetCore.CAP.Infrastructure
{ {
/// <summary> /// <summary>
/// Represents an ObjectId /// Represents an ObjectId
......
using System; using System;
using DotNetCore.CAP.Infrastructure;
namespace DotNetCore.CAP.Models namespace DotNetCore.CAP.Models
{ {
......
...@@ -57,7 +57,7 @@ namespace DotNetCore.CAP.NodeDiscovery ...@@ -57,7 +57,7 @@ namespace DotNetCore.CAP.NodeDiscovery
{ {
CapCache.Global.AddOrUpdate("cap.nodes.count", 0, TimeSpan.FromSeconds(20)); CapCache.Global.AddOrUpdate("cap.nodes.count", 0, TimeSpan.FromSeconds(20));
_logger.LogError("Get consul nodes raised an exception. Exception:" + ex.Message); _logger.LogError($"Get consul nodes raised an exception. Exception:{ex.Message},{ex.InnerException.Message}");
return null; return null;
} }
} }
...@@ -85,7 +85,7 @@ namespace DotNetCore.CAP.NodeDiscovery ...@@ -85,7 +85,7 @@ namespace DotNetCore.CAP.NodeDiscovery
} }
catch (Exception ex) catch (Exception ex)
{ {
_logger.LogError("Register consul nodes raised an exception. Exception:" + ex.Message); _logger.LogError($"Get consul nodes raised an exception. Exception:{ex.Message},{ex.InnerException.Message}");
return null; return null;
} }
} }
......
...@@ -12,9 +12,9 @@ namespace DotNetCore.CAP.Processor.States ...@@ -12,9 +12,9 @@ namespace DotNetCore.CAP.Processor.States
ExpiresAfter = TimeSpan.FromHours(1); ExpiresAfter = TimeSpan.FromHours(1);
} }
public SucceededState(int ExpireAfterSeconds) public SucceededState(int expireAfterSeconds)
{ {
ExpiresAfter = TimeSpan.FromSeconds(ExpireAfterSeconds); ExpiresAfter = TimeSpan.FromSeconds(expireAfterSeconds);
} }
public TimeSpan? ExpiresAfter { get; } public TimeSpan? ExpiresAfter { get; }
......
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