using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CefSharp.DevTools.Page
{
public partial class Viewport
{
///
/// Default Constructor
///
public Viewport()
{
Scale = 1.0;
}
}
}
namespace CefSharp.DevTools.Network
{
public partial class NetworkClient
{
///
/// Fetches the resource and returns the content.
///
/// Frame id to get the resource for. Mandatory for frame targets, and should be omitted for worker targets.
/// URL of the resource to get content for.
/// Options for the request.
/// returns System.Threading.Tasks.Task<LoadNetworkResourceResponse>
///
/// 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.
///
public System.Threading.Tasks.Task LoadNetworkResourceAsync(string frameId, string url, CefSharp.DevTools.Network.LoadNetworkResourceOptions options)
{
var dict = new System.Collections.Generic.Dictionary();
if (!(string.IsNullOrEmpty(frameId)))
{
dict.Add("frameId", frameId);
}
dict.Add("url", url);
dict.Add("options", options.ToDictionary());
return _client.ExecuteDevToolsMethodAsync("Network.loadNetworkResource", dict);
}
}
}