升级Remoteing的ClientBase
This commit is contained in:
parent
2ce3df2389
commit
413916b00d
|
@ -47,7 +47,7 @@
|
|||
<Content Include="favicon.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="NewLife.Cube.Core" Version="6.1.2024.625-beta0006" />
|
||||
<PackageReference Include="NewLife.Cube.Core" Version="6.1.2024.625-beta1720" />
|
||||
<PackageReference Include="NewLife.Stardust.Extensions" Version="3.0.2024.624-beta0629" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
|
|
@ -45,8 +45,8 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="NewLife.Core" Version="10.10.2024.625-beta0716" />
|
||||
<PackageReference Include="NewLife.Remoting" Version="3.0.2024.625-beta0716" />
|
||||
<PackageReference Include="NewLife.Core" Version="10.10.2024.625-beta1559" />
|
||||
<PackageReference Include="NewLife.Remoting" Version="3.0.2024.625-beta1714" />
|
||||
<PackageReference Include="NewLife.Stardust" Version="2.9.2024.620-beta1617" />
|
||||
</ItemGroup>
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@ using AntJob.Data;
|
|||
using AntJob.Models;
|
||||
using NewLife;
|
||||
using NewLife.Model;
|
||||
using NewLife.Net;
|
||||
using NewLife.Reflection;
|
||||
using NewLife.Remoting.Clients;
|
||||
using NewLife.Remoting.Models;
|
||||
|
@ -14,20 +15,31 @@ namespace AntJob.Providers;
|
|||
/// <summary>蚂蚁客户端</summary>
|
||||
public class AntClient : ClientBase
|
||||
{
|
||||
private readonly AntSetting _setting;
|
||||
#region 属性
|
||||
private readonly AntSetting _setting;
|
||||
#endregion
|
||||
|
||||
#region 构造
|
||||
/// <summary>实例化</summary>
|
||||
public AntClient() => Prefix = "";
|
||||
public AntClient() => InitClient();
|
||||
|
||||
/// <summary>实例化</summary>
|
||||
/// <param name="setting"></param>
|
||||
public AntClient(AntSetting setting) : base(setting)
|
||||
{
|
||||
_setting = setting;
|
||||
Prefix = _setting.Server.StartsWithIgnoreCase("http://", "https://") ? "AntJob/" : "";
|
||||
|
||||
InitClient();
|
||||
}
|
||||
|
||||
private void InitClient()
|
||||
{
|
||||
Features = Features.Login | Features.Ping;
|
||||
|
||||
if (Server.StartsWithIgnoreCase("http://", "https://"))
|
||||
SetActions("AntJob/");
|
||||
else
|
||||
SetActions("");
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
@ -49,7 +61,7 @@ public class AntClient : ClientBase
|
|||
//container.TryAddTransient<IUpgradeInfo, UpgradeInfo>();
|
||||
}
|
||||
|
||||
Prefix = _setting.Server.StartsWithIgnoreCase("http://", "https://") ? "AntJob/" : "";
|
||||
InitClient();
|
||||
|
||||
base.OnInit();
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="NewLife.Cube.Core" Version="6.1.2024.625-beta0006" />
|
||||
<PackageReference Include="NewLife.Cube.Core" Version="6.1.2024.625-beta1720" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
Loading…
Reference in New Issue