using ComposerSDK; using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Epost.DAL.Cache { public class EPlightCacheDAL { private static object lockobj = new object(); public static List XgatesList = new List();// #region 获取EPlight列表 //public List GetXgateList() //{ // return XgatesList; //} #endregion #region 初始Xgate列表 public void ClearXgateList() { foreach (var item in XgatesList.ToArray()) { XgatesList.Remove(item); } } #endregion #region xgate缓存处理方法 /// /// xgate缓存处理方法 /// /// /// /// public bool UpdateXgatesList(List JobParam, EXgateCommend CommendType) { lock (lockobj) { if (CommendType.Equals(EXgateCommend.Create)) { XgatesList.AddRange(JobParam); } else if (CommendType.Equals(EXgateCommend.Execute)) { JobParam.ForEach(m => XgatesList.Remove(m)); } return true; } } #endregion } public enum EXgateCommend { /// /// Xgate创建 /// [Description("Xgate创建")] Create, /// /// Xgate清除 /// [Description("Xgate清除")] Execute } }