init lserp cs 5.0

This commit is contained in:
cyf
2026-07-10 15:25:05 +08:00
commit 90f3fda86a
3799 changed files with 976868 additions and 0 deletions
@@ -0,0 +1,49 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Cef3;
using Sashulin.Core;
namespace Sashulin.common
{
class CwbCookieVisitor : CefCookieVisitor
{
private CwbCookieStyle _style;
private CwbDocument _document;
public CwbCookieVisitor(CwbCookieStyle style,CwbDocument document)
{
_style = style;
_document = document;
}
protected override bool Visit(CefCookie cookie, int count, int total, out bool delete)
{
delete = false;
switch (_style)
{
case CwbCookieStyle.csDeleteAllCookie:
delete = true;
break;
case CwbCookieStyle.csVisitUrlCookie:
string cookieValue = cookie.Name + "=" + cookie.Value + ";";
_document._cookie += cookieValue;
CwbCookie cookieItem = new CwbCookie();
cookieItem.Creation = cookie.Creation;
cookieItem.Domain = cookie.Domain;
cookieItem.Expires = cookie.Expires;
cookieItem.HttpOnly = cookie.HttpOnly;
cookieItem.LastAccess = cookie.LastAccess;
cookieItem.Name = cookie.Name;
cookieItem.Path = cookie.Path;
cookieItem.Secure = cookie.Secure;
cookieItem.Value = cookie.Value;
_document._cookies.Add(cookieItem);
break;
}
return true;
}
}
}