1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- using CefSharp;
- using System.Collections.Generic;
- namespace UAS_Web.tool
- {
- class FilterManager
- {
- public static Dictionary<string, IResponseFilter> dataList = new Dictionary<string, IResponseFilter>();
- 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;
- }
- }
- }
|