DeviceManager/TsSFCDevice.Client.Biz/Base/Utils/Utility.cs
2024-07-27 09:44:19 +08:00

72 lines
2.2 KiB
C#
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using DeviceRepair.Utils;
using TsSFCDevice.Client.Biz.Base.Service;
namespace TsSFCDevice.Client.Biz.Base.Utils
{
public class Utility
{
/// <summary>
/// 默认的WebService超时时间默认5分钟
/// </summary>
public const int DEFAULT_SERVICE_TIMEOUT = 300000;
#region WebServiceSOAP验证头用户信息
/// <summary>
/// WebServiceSOAP验证头用户
/// </summary>
private const string SOPHeadUserName = "TECHSCAN_Myl";
/// <summary>
/// WebServiceSOAP验证头用户密码
/// </summary>
private const string SOPHeadUserPass = "^____^#####*****^____^";
#endregion
/// <summary>
/// 获取当前WebService服务对象
/// </summary>
private static TsSFCMainSvc @m_DevMainService;
/// <summary>
/// 获取当前WebService服务对象
/// </summary>
public static TsSFCMainSvc @SfcBizService
{
get
{
if (@m_DevMainService == null)
{
@m_DevMainService = new TsSFCMainSvc(
SOPHeadUserName,
SOPHeadUserPass,
"",
$"http://{DeviceRepair.Utils.Config.Configurations.Properties.ServiceIP}/{DeviceRepair.Utils.Config.Configurations.Properties.ServiceName}/MainService.asmx");
}
return @m_DevMainService;
}
}
private static SysRuntimeInfo m_SystemRuntimeInfo;
/// <summary>
/// 当前系统运行时信息对象
/// </summary>
public static SysRuntimeInfo SystemRuntimeInfo
{
get
{
if (m_SystemRuntimeInfo == null)
{
m_SystemRuntimeInfo = new SysRuntimeInfo()
{
ComputerName = ComputerHelper.GetComputerName
};
}
return m_SystemRuntimeInfo;
}
set
{
m_SystemRuntimeInfo = value;
}
}
}
}