资源简介
代码片段和文件信息
// Copyright © 2010-2017 The CefSharp Authors. All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace CefSharp
{
///
/// Async extensions for different interfaces
///
public static class AsyncExtensions
{
///
/// Deletes all cookies that matches all the provided parameters asynchronously.
/// If both and are empty all cookies will be deleted.
///
/// cookie manager
/// The cookie URL. If an empty string is provided any URL will be matched.
/// The name of the cookie. If an empty string is provided any URL will be matched.
/// Returns -1 if a non-empty invalid URL is specified or if cookies cannot be accessed;
/// otherwise a task that represents the delete operation. The value of the TResult will be the number of cookies that were deleted or -1 if unknown.
public static Task DeleteCookiesAsync(this ICookieManager cookieManager string url = null string name = null)
{
if(cookieManager == null)
{
throw new NullReferenceException(“cookieManager“);
}
if(cookieManager.IsDisposed)
{
throw new objectDisposedException(“cookieManager“);
}
var callback = new TaskDeleteCookiesCallback();
if(cookieManager.DeleteCookies(url name callback))
{
return callback.Task;
}
//There was a problem deleting cookies
return Task.FromResult(TaskDeleteCookiesCallback.InvalidNoOfCookiesDeleted);
}
///
/// Sets a cookie given a valid URL and explicit user-provided cookie attributes.
/// This function expects each attribute to be well-formed. It will check for disallowed
/// characters (e.g. the ‘;‘ character is disallowed within the cookie value attribute) and will return false without setting
///
/// cookie manager
/// The cookie URL. If an empty string is provided any URL will be matched.
/// the cookie to be set
/// returns false if the cookie cannot be set (e.g. if illegal charecters such as ‘;‘ are used);
/// otherwise task that represents the set operation. The value of the TResult parameter contains a bool to indicate success.
public static Task SetCookieAsync(this ICookieManager cookieManager string url Cookie cookie)
{
if (cookieManager == null)
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2018-03-23 05:36 CefSharp-cefsharp-63\
文件 172 2018-03-23 05:36 CefSharp-cefsharp-63\.gitattributes
文件 490 2018-03-23 05:36 CefSharp-cefsharp-63\.gitignore
文件 270 2018-03-23 05:36 CefSharp-cefsharp-63\Build.bat
文件 10539 2018-03-23 05:36 CefSharp-cefsharp-63\CONTRIBUTING.md
目录 0 2018-03-23 05:36 CefSharp-cefsharp-63\CefSharp.BrowserSubprocess.Core\
文件 888 2018-03-23 05:36 CefSharp-cefsharp-63\CefSharp.BrowserSubprocess.Core\AssemblyInfo.cpp
目录 0 2018-03-23 05:36 CefSharp-cefsharp-63\CefSharp.BrowserSubprocess.Core\Async\
文件 1502 2018-03-23 05:36 CefSharp-cefsharp-63\CefSharp.BrowserSubprocess.Core\Async\ja
文件 1336 2018-03-23 05:36 CefSharp-cefsharp-63\CefSharp.BrowserSubprocess.Core\Async\ja
文件 2302 2018-03-23 05:36 CefSharp-cefsharp-63\CefSharp.BrowserSubprocess.Core\Async\ja
文件 1875 2018-03-23 05:36 CefSharp-cefsharp-63\CefSharp.BrowserSubprocess.Core\Async\ja
文件 793 2018-03-23 05:36 CefSharp-cefsharp-63\CefSharp.BrowserSubprocess.Core\Async\ja
文件 1065 2018-03-23 05:36 CefSharp-cefsharp-63\CefSharp.BrowserSubprocess.Core\Async\ja
文件 1417 2018-03-23 05:36 CefSharp-cefsharp-63\CefSharp.BrowserSubprocess.Core\Async\ja
文件 1591 2018-03-23 05:36 CefSharp-cefsharp-63\CefSharp.BrowserSubprocess.Core\Async\ja
文件 27559 2018-03-23 05:36 CefSharp-cefsharp-63\CefSharp.BrowserSubprocess.Core\CefAppUnmanagedWrapper.cpp
文件 3912 2018-03-23 05:36 CefSharp-cefsharp-63\CefSharp.BrowserSubprocess.Core\CefAppUnmanagedWrapper.h
文件 2068 2018-03-23 05:36 CefSharp-cefsharp-63\CefSharp.BrowserSubprocess.Core\CefBrowserWrapper.h
文件 13279 2018-03-23 05:36 CefSharp-cefsharp-63\CefSharp.BrowserSubprocess.Core\CefSharp.BrowserSubprocess.Core.vcxproj
文件 6062 2018-03-23 05:36 CefSharp-cefsharp-63\CefSharp.BrowserSubprocess.Core\CefSharp.BrowserSubprocess.Core.vcxproj.filters
文件 1401 2018-03-23 05:36 CefSharp-cefsharp-63\CefSharp.BrowserSubprocess.Core\ja
文件 1706 2018-03-23 05:36 CefSharp-cefsharp-63\CefSharp.BrowserSubprocess.Core\ja
文件 1159 2018-03-23 05:36 CefSharp-cefsharp-63\CefSharp.BrowserSubprocess.Core\ja
文件 2519 2018-03-23 05:36 CefSharp-cefsharp-63\CefSharp.BrowserSubprocess.Core\ja
文件 1356 2018-03-23 05:36 CefSharp-cefsharp-63\CefSharp.BrowserSubprocess.Core\ja
文件 915 2018-03-23 05:36 CefSharp-cefsharp-63\CefSharp.BrowserSubprocess.Core\ja
文件 1422 2018-03-23 05:36 CefSharp-cefsharp-63\CefSharp.BrowserSubprocess.Core\ja
文件 2223 2018-03-23 05:36 CefSharp-cefsharp-63\CefSharp.BrowserSubprocess.Core\ja
文件 1852 2018-03-23 05:36 CefSharp-cefsharp-63\CefSharp.BrowserSubprocess.Core\ja
文件 2219 2018-03-23 05:36 CefSharp-cefsharp-63\CefSharp.BrowserSubprocess.Core\ja
............此处省略644个文件信息
- 上一篇:Raw格式图像文件显示与转换
- 下一篇:C# 视觉处理代码、神经网络和遗传算法集合
相关资源
- WPF贝塞尔曲线
- WPF 简单控件集
- WPF鼠标拖动控件源码
- wpf开发教程
- AduMusic迷你音乐盒WPF源码
- WPF PDF封装(放大、缩小、单页、双页
- C# .NET5.0(net core)基于WPF(XAML)开发
- WPF MVVM 基础入门
- wpf echart
- windorm 加载WPF控件 ,实现dxf文件显示
- WPF Control Development
- wpf Dock window
- WPF 隐蔽查看股票行情工具
- WPF控件库(HandyControl)
- 别踩白块wpf 源码
- WPF贪吃蛇
- WPF Task 多任务
- WPF path动画
- WPF 最基础的组件拖动、改变大小
- WPF DATAGRID 数据绑定
- WPF绘制坐标系(可放大缩小)
- wpf在线更新
- wpf键盘源码(支持复合键)
- 最简单的WPF+Mvvm
- WPF+MVVM学习 DataGrid简单案例
- WPF开发串口调试助手
- wpf 高仿bootstrap 样式
- WPF窗口贴边自动隐藏
- WPF+MVVM+DataGrid增删改查
- wpf 视频播放(基于MediaElement)
评论
共有 条评论