Commit 2b90afd9 authored by Savorboard's avatar Savorboard

cleanup code.

parent 39e1b310
......@@ -12,7 +12,7 @@
<PackageReference Include="Dapper" Version="1.50.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore" 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>
......
......@@ -43,7 +43,7 @@ namespace DotNetCore.CAP.Abstractions.ModelBinding
{
if (IsSuccess)
return $"Success '{Model}'";
return $"Failed";
return "Failed";
}
public override bool Equals(object obj)
......
......@@ -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
/// <see cref="ThreadPool" /> threads).
/// </summary>
// ReSharper disable once InheritdocConsiderUsage
// ReSharper disable once InconsistentNaming
public class Cache<K, T> : IDisposable
{
#region Constructor and class members
......
......@@ -150,9 +150,6 @@
<data name="Common_MoreDetails" xml:space="preserve">
<value>更多...</value>
</data>
<data name="Common_NotAvailable" xml:space="preserve">
<value>N/A</value>
</data>
<data name="Common_PeriodDay" xml:space="preserve">
<value></value>
</data>
......@@ -213,27 +210,6 @@
<data name="PerPageSelector_ItemsPerPage" xml:space="preserve">
<value>每页条数</value>
</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">
<value>心跳</value>
</data>
......@@ -276,36 +252,18 @@
<data name="NavigationMenu_Servers" xml:space="preserve">
<value>服务器</value>
</data>
<data name="Common_CannotFindTargetMethod" xml:space="preserve">
<value>Can not find the target method.</value>
</data>
<data name="Common_Enqueued" xml:space="preserve">
<value>队列</value>
</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">
<value>删除</value>
</data>
<data name="Metrics_ProcessingJobs" xml:space="preserve">
<value>执行中</value>
</data>
<data name="Metrics_Servers" xml:space="preserve">
<value>服务器</value>
</data>
<data name="Metrics_TotalConnections" xml:space="preserve">
<value>总连接数</value>
</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">
<value>等待中</value>
</data>
......@@ -357,9 +315,6 @@
<data name="MessagesPage_Table_Retries" xml:space="preserve">
<value>重试次数</value>
</data>
<data name="MesssagesPage_NoMessages" xml:space="preserve">
<value>没有消息</value>
</data>
<data name="PublishedPage_Title" xml:space="preserve">
<value>已发送消息</value>
</data>
......
......@@ -100,10 +100,10 @@
<Compile Update="Dashboard\Pages\PublishedPage.cs">
<DependentUpon>PublishedPage.cshtml</DependentUpon>
</Compile>
<Compile Update="Dashboard\Pages\PublishedPage1.generated.cs">
<Compile Update="Dashboard\Pages\PublishedPage*.cs">
<DependentUpon>PublishedPage.cshtml</DependentUpon>
</Compile>
<Compile Update="Dashboard\Pages\LayoutPage1.generated.cs">
<Compile Update="Dashboard\Pages\LayoutPage.*.cs">
<DependentUpon>LayoutPage.cshtml</DependentUpon>
</Compile>
<Compile Update="Dashboard\Pages\LayoutPage.cs">
......@@ -138,9 +138,4 @@
<LastGenOutput>Strings.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Update="Dashboard\Pages\HomePage.cshtml">
<Generator>RazorGenerator</Generator>
</None>
</ItemGroup>
</Project>
\ No newline at end of file
......@@ -6,7 +6,7 @@ using System.Security.Cryptography;
using System.Text;
using System.Threading;
namespace DotNetCore.CAP
namespace DotNetCore.CAP.Infrastructure
{
/// <summary>
/// Represents an ObjectId
......
using System;
using DotNetCore.CAP.Infrastructure;
namespace DotNetCore.CAP.Models
{
......
......@@ -57,7 +57,7 @@ namespace DotNetCore.CAP.NodeDiscovery
{
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;
}
}
......@@ -85,7 +85,7 @@ namespace DotNetCore.CAP.NodeDiscovery
}
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;
}
}
......
......@@ -12,9 +12,9 @@ namespace DotNetCore.CAP.Processor.States
ExpiresAfter = TimeSpan.FromHours(1);
}
public SucceededState(int ExpireAfterSeconds)
public SucceededState(int expireAfterSeconds)
{
ExpiresAfter = TimeSpan.FromSeconds(ExpireAfterSeconds);
ExpiresAfter = TimeSpan.FromSeconds(expireAfterSeconds);
}
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