-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Expand file tree
/
Copy pathDevToolsClient.Partial.cs
More file actions
49 lines (46 loc) · 1.79 KB
/
DevToolsClient.Partial.cs
File metadata and controls
49 lines (46 loc) · 1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CefSharp.DevTools.Page
{
public partial class Viewport
{
/// <summary>
/// Default Constructor
/// </summary>
public Viewport()
{
Scale = 1.0;
}
}
}
namespace CefSharp.DevTools.Network
{
public partial class NetworkClient
{
/// <summary>
/// Fetches the resource and returns the content.
/// </summary>
/// <param name = "frameId">Frame id to get the resource for. Mandatory for frame targets, and should be omitted for worker targets.</param>
/// <param name = "url">URL of the resource to get content for.</param>
/// <param name = "options">Options for the request.</param>
/// <returns>returns System.Threading.Tasks.Task<LoadNetworkResourceResponse></returns>
/// <remarks>
/// This overload of LoadNetworkResourceAsync exists to avoid a breaking change as optional params are now always at the end
/// where previously they weren't marked as optional when at the beginning.
/// </remarks>
public System.Threading.Tasks.Task<LoadNetworkResourceResponse> LoadNetworkResourceAsync(string frameId, string url, CefSharp.DevTools.Network.LoadNetworkResourceOptions options)
{
var dict = new System.Collections.Generic.Dictionary<string, object>();
if (!(string.IsNullOrEmpty(frameId)))
{
dict.Add("frameId", frameId);
}
dict.Add("url", url);
dict.Add("options", options.ToDictionary());
return _client.ExecuteDevToolsMethodAsync<LoadNetworkResourceResponse>("Network.loadNetworkResource", dict);
}
}
}