You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
49 lines
1.7 KiB
49 lines
1.7 KiB
using CounsellorBL.BLStructure;
|
|
using MonumentDefine;
|
|
using OT.COM.SignalerMessage;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Diagnostics;
|
|
using System.Linq;
|
|
using System.Reflection;
|
|
|
|
|
|
namespace CounsellorBL
|
|
{
|
|
public class SystemInfoService : ServiceBase
|
|
{
|
|
public CResponseMessage Read(CRequestMessage i_crmInput)
|
|
{
|
|
CResponseMessage crmRes = null;
|
|
|
|
do
|
|
{
|
|
string codeBase = Assembly.GetExecutingAssembly().GetName().CodeBase;
|
|
codeBase = codeBase.Substring(0, codeBase.LastIndexOf("/", StringComparison.OrdinalIgnoreCase));
|
|
|
|
List<object> loRes = new List<object>();
|
|
Assembly[] assemblyArray = (from f in AppDomain.CurrentDomain.GetAssemblies()
|
|
where !f.IsDynamic
|
|
&& f.CodeBase != null
|
|
&& f.FullName.IndexOf("CounsellorBL", StringComparison.OrdinalIgnoreCase) != -1
|
|
&& f.CodeBase.StartsWith(codeBase, StringComparison.OrdinalIgnoreCase)
|
|
select f).ToArray();
|
|
Assembly abFirst = assemblyArray.FirstOrDefault();
|
|
if (abFirst != null)
|
|
{
|
|
loRes.Add(new SystemInfo() { item_key = BLWording.BACKEND_VERSION, item_value = FileVersionInfo.GetVersionInfo(abFirst.Location).FileVersion });
|
|
}
|
|
|
|
crmRes = new CSuccessResponseMessage(null, i_crmInput);
|
|
|
|
// 填寫回傳
|
|
crmRes.param.Add(BLWording.DATA, loRes);
|
|
}
|
|
while (false);
|
|
|
|
return crmRes;
|
|
}
|
|
|
|
|
|
}
|
|
}
|