1优化拍单逻辑 2优化部分文件位置命名等
This commit is contained in:
1 parent
34c51c6fcd
commit
1e27c0b1e1
65 files changed
+2594
-268
No files matched your search
@@ -0,0 +1,72 @@
|
||||
using CefSharp;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Work._29Tools.CefTools
|
||||
{
|
||||
public class LocalCookieVisitor : ICookieVisitor
|
||||
{
|
||||
public List<Cookie> CookieList;
|
||||
public ManualResetEvent gotAllCookie = new ManualResetEvent(false);
|
||||
|
||||
public LocalCookieVisitor()
|
||||
{
|
||||
CookieList = new List<Cookie>();
|
||||
}
|
||||
|
||||
public bool Visit(Cookie cookie, int count, int total, ref bool deleteCookie)
|
||||
{
|
||||
CookieList.Add(cookie);
|
||||
if (count == total - 1)
|
||||
{
|
||||
gotAllCookie.Set();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public void WaitForAllCookie()
|
||||
{
|
||||
gotAllCookie.WaitOne();
|
||||
}
|
||||
|
||||
#region IDisposable Support
|
||||
private bool disposedValue = false; // To detect redundant calls
|
||||
|
||||
protected virtual void Dispose(bool disposing)
|
||||
{
|
||||
if (!disposedValue)
|
||||
{
|
||||
if (disposing)
|
||||
{
|
||||
// TODO: dispose managed state (managed objects).
|
||||
}
|
||||
|
||||
// TODO: free unmanaged resources (unmanaged objects) and override a finalizer below.
|
||||
// TODO: set large fields to null.
|
||||
|
||||
disposedValue = true;
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: override a finalizer only if Dispose(bool disposing) above has code to free unmanaged resources.
|
||||
// ~CookieVisitor()
|
||||
// {
|
||||
// // Do not change this code. Put cleanup code in Dispose(bool disposing) above.
|
||||
// Dispose(false);
|
||||
// }
|
||||
|
||||
// This code added to correctly implement the disposable pattern.
|
||||
void IDisposable.Dispose()
|
||||
{
|
||||
// Do not change this code. Put cleanup code in Dispose(bool disposing) above.
|
||||
Dispose(true);
|
||||
// TODO: uncomment the following line if the finalizer is overridden above.
|
||||
// GC.SuppressFinalize(this);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user