瀏覽代碼

cleanup code.

master
Savorboard 7 年之前
父節點
當前提交
2b90afd9e8
共有 9 個檔案被更改,包括 12 行新增59 行删除
  1. +1
    -1
      src/DotNetCore.CAP.MySql/DotNetCore.CAP.MySql.csproj
  2. +1
    -1
      src/DotNetCore.CAP/Abstractions/ModelBinding/ModelBindingResult.cs
  3. +2
    -0
      src/DotNetCore.CAP/CapCache.cs
  4. +0
    -45
      src/DotNetCore.CAP/Dashboard/Content/resx/Strings.zh.resx
  5. +2
    -7
      src/DotNetCore.CAP/DotNetCore.CAP.csproj
  6. +1
    -1
      src/DotNetCore.CAP/Infrastructure/ObjectId.cs
  7. +1
    -0
      src/DotNetCore.CAP/Models/CapMessageDto.cs
  8. +2
    -2
      src/DotNetCore.CAP/NodeDiscovery/INodeDiscoveryProvider.Consul.cs
  9. +2
    -2
      src/DotNetCore.CAP/Processor/States/IState.Succeeded.cs

+ 1
- 1
src/DotNetCore.CAP.MySql/DotNetCore.CAP.MySql.csproj 查看文件

@@ -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>


+ 1
- 1
src/DotNetCore.CAP/Abstractions/ModelBinding/ModelBindingResult.cs 查看文件

@@ -43,7 +43,7 @@ namespace DotNetCore.CAP.Abstractions.ModelBinding
{
if (IsSuccess)
return $"Success '{Model}'";
return $"Failed";
return "Failed";
}

public override bool Equals(object obj)


+ 2
- 0
src/DotNetCore.CAP/CapCache.cs 查看文件

@@ -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


+ 0
- 45
src/DotNetCore.CAP/Dashboard/Content/resx/Strings.zh.resx 查看文件

@@ -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>


+ 2
- 7
src/DotNetCore.CAP/DotNetCore.CAP.csproj 查看文件

@@ -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>

+ 1
- 1
src/DotNetCore.CAP/Infrastructure/ObjectId.cs 查看文件

@@ -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


+ 1
- 0
src/DotNetCore.CAP/Models/CapMessageDto.cs 查看文件

@@ -1,4 +1,5 @@
using System;
using DotNetCore.CAP.Infrastructure;

namespace DotNetCore.CAP.Models
{


+ 2
- 2
src/DotNetCore.CAP/NodeDiscovery/INodeDiscoveryProvider.Consul.cs 查看文件

@@ -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;
}
}


+ 2
- 2
src/DotNetCore.CAP/Processor/States/IState.Succeeded.cs 查看文件

@@ -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; }


Loading…
取消
儲存