Example #1
0
        public static void Serialize(this XYKernel.OS.Common.Models.Administrative.AlgoRule.AlgoRule model, string localID)
        {
            string path     = CacheManager.Instance.GetDataPath();
            string algoPath = $"{path}\\{localID}\\{localID}.algo";

            algoPath.SerializeObjectToJson(model);
        }
Example #2
0
 public void AddAminAlgoRule(string localID, XYKernel.OS.Common.Models.Administrative.AlgoRule.AlgoRule model)
 {
     if (AdminAlgoes.ContainsKey(localID))
     {
         AdminAlgoes[localID] = model;
     }
     else
     {
         AdminAlgoes.Add(localID, model);
     }
 }
Example #3
0
        public XYKernel.OS.Common.Models.Administrative.AlgoRule.AlgoRule GetAminAlgoRule(string localID)
        {
            if (AdminAlgoes.ContainsKey(localID))
            {
                return(AdminAlgoes[localID]);
            }
            else
            {
                var newAlgo = new XYKernel.OS.Common.Models.Administrative.AlgoRule.AlgoRule();
                AdminAlgoes.Add(localID, newAlgo);

                return(newAlgo);
            }
        }