using CefSharp; using System.Collections.Generic; namespace UAS_Web.tool { class FilterManager { public static Dictionary dataList = new Dictionary(); public static IResponseFilter CreateFilter(string guid) { try { lock (dataList) { var filter = new MessageFilter(); dataList.Add(guid, filter); return filter; } } catch (System.Exception e) { System.Console.WriteLine("插入报错" + e.Message.ToString()); } return null; } public static IResponseFilter GetFileter(string guid) { try { lock (dataList) { return dataList[guid]; } } catch (System.Exception e) { System.Console.WriteLine("读取报错" + e.Message.ToString()); } return null; } } }