mirror of
https://github.com/cefsharp/CefSharp.git
synced 2026-12-06 12:09:40 +00:00
More xmldoc
This commit is contained in:
@@ -9,6 +9,10 @@ namespace CefSharp
|
||||
/// </summary>
|
||||
public interface IStringVisitor
|
||||
{
|
||||
/// <summary>
|
||||
/// Method that will be executed.
|
||||
/// </summary>
|
||||
/// <param name="str">string (result of async execution)</param>
|
||||
void Visit(string str);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,20 +6,34 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace CefSharp
|
||||
{
|
||||
/// <summary>
|
||||
/// A <see cref="IStringVisitor"/> that uses a TaskCompletionSource
|
||||
/// to simplify things
|
||||
/// </summary>
|
||||
public class TaskStringVisitor : IStringVisitor
|
||||
{
|
||||
private readonly TaskCompletionSource<string> taskCompletionSource;
|
||||
|
||||
/// <summary>
|
||||
/// Default constructor
|
||||
/// </summary>
|
||||
public TaskStringVisitor()
|
||||
{
|
||||
taskCompletionSource = new TaskCompletionSource<string>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method that will be executed.
|
||||
/// </summary>
|
||||
/// <param name="str">string (result of async execution)</param>
|
||||
public void Visit(string str)
|
||||
{
|
||||
taskCompletionSource.SetResult(str);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Task that can be awaited for the result to be retrieved async
|
||||
/// </summary>
|
||||
public Task<string> Task
|
||||
{
|
||||
get { return taskCompletionSource.Task; }
|
||||
|
||||
@@ -11,8 +11,15 @@ namespace CefSharp
|
||||
/// </summary>
|
||||
public class TitleChangedEventArgs : EventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// The new title
|
||||
/// </summary>
|
||||
public string Title { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new TitleChanged event arg
|
||||
/// </summary>
|
||||
/// <param name="title">the new title</param>
|
||||
public TitleChangedEventArgs(string title)
|
||||
{
|
||||
Title = title;
|
||||
|
||||
Reference in New Issue
Block a user