//using Newtonsoft.Json; //using System; //using System.Collections.Generic; //using System.Diagnostics; //using System.Threading; //namespace JinYuan.Models //{ // /// // /// 卡板ID及档位类 // /// // public class CartainerConfig // { // /// // /// 卡板ID及档位映射字典 // /// // public Dictionary CartainerGrade { get; set; } = new Dictionary(); // /// // /// 默认卡板ID // /// // public string DefaultCartainerId { get; set; } = ""; // /// // /// 是否启用卡板验证 // /// // public bool EnableCartainerValidation { get; set; } = true; // /// // /// 根据卡板ID获取档位 // /// // /// 卡板ID // /// 档位信息 // public string GetGrade(string cartainerId) // { // if (CartainerGrade.ContainsKey(cartainerId)) // { // return CartainerGrade[cartainerId]; // } // return string.Empty; // } // /// // /// 添加或更新卡板档位 // /// // /// 卡板ID // /// 档位 // public void AddOrUpdateCartainer(string cartainerId, string grade) // { // if (CartainerGrade.ContainsKey(cartainerId)) // { // CartainerGrade[cartainerId] = grade; // } // else // { // CartainerGrade.Add(cartainerId, grade); // } // } // /// // /// 移除卡板 // /// // /// 卡板ID // /// 是否成功移除 // public bool RemoveCartainer(string cartainerId) // { // return CartainerGrade.Remove(cartainerId); // } // /// // /// 清空所有卡板数据 // /// // public void ClearAll() // { // CartainerGrade.Clear(); // } // /// // /// 验证卡板ID是否存在 // /// // /// 卡板ID // /// 是否存在 // public bool ContainsCartainer(string cartainerId) // { // return CartainerGrade.ContainsKey(cartainerId); // } // } //}