Files
Main/Assets/Plugins/References/FuncellUpdate/UpdateModel/Flow/Flow2LocalXml.cs
2025-01-25 04:38:09 +08:00

46 lines
1.2 KiB
C#

using System;
using System.Collections.Generic;
using System.Text;
using Thousandto.Update.Xml;
using Thousandto.Update.Log;
namespace Thousandto.Update.Flow
{
/// <summary>
/// 2. 解析本地LocalVersion.xml的流程
/// </summary>
public class Flow2LocalXml : BaseFlow
{
public override int Work()
{
if (!CheckLastFlowResult()) return LastFlowResult;
string localXmlPath = _localXmlPath;
return parseLocalVersion(localXmlPath);
}
public override void Uninitialize()
{
LocalXml = null;
}
//解析localversion
public int parseLocalVersion(string localXmlPath)
{
int ret = CodeDefine.RET_SUCCESS;
LocalXml = new LocalVersionXml();
ret = LocalXml.parseLocalVersionXml(localXmlPath);
if (ret >= CodeDefine.RET_SUCCESS)
{
LocalBaseResVersion = LocalXml.BaseResVersion;
}
//打点解析localXml
var success = ret >= CodeDefine.RET_SUCCESS;
Recorder.StepRecorder.AddStep(Recorder.StepType.ParseLocalXml, success ? 0 : 1, success.ToString());
return ret;
}
}
}