// Copyright © 2021 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.IO; namespace CefSharp.Fluent { /// /// Fluent UrlRequestClient Builder /// public class UrlRequestClientBuilder { private UrlRequestClient client = new UrlRequestClient(); /// /// See for details /// /// function to be executed when /// is called /// /// Fluent Builder, call to create /// a new instance /// public UrlRequestClientBuilder GetAuthCredentials(GetAuthCredentialsDelegate func) { client.SetGetAuthCredentials(func); return this; } /// /// See for details. /// /// Action to be executed when /// is called /// /// Fluent Builder, call to create /// a new instance /// public UrlRequestClientBuilder OnDownloadData(OnDownloadDataDelegate action) { client.SetOnDownloadData(action); return this; } /// /// See for details. /// /// Action to be executed when /// is called /// /// Fluent Builder, call to create /// a new instance /// public UrlRequestClientBuilder OnDownloadProgress(OnDownloadProgressDelegate action) { client.SetOnDownloadProgress(action); return this; } /// /// See for details. /// /// Action to be executed when /// is called /// /// Fluent Builder, call to create /// a new instance /// public UrlRequestClientBuilder OnRequestComplete(OnRequestCompleteDelegate action) { client.SetOnRequestComplete(action); return this; } /// /// See for details. /// /// Action to be executed when /// is called /// /// Fluent Builder, call to create /// a new instance /// public UrlRequestClientBuilder OnUploadProgress(OnUploadProgressDelegate action) { client.SetOnUploadProgress(action); return this; } /// /// Create a instance /// /// a instance public IUrlRequestClient Build() { return client; } } }