Skip to content

Commit

Permalink
Core - Xml Doc improvements/fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
amaitland committed Jul 5, 2021
1 parent 4a20b19 commit 1d1b6f2
Show file tree
Hide file tree
Showing 29 changed files with 74 additions and 28 deletions.
2 changes: 1 addition & 1 deletion CefSharp.Core.Runtime/PostData.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ namespace CefSharp

public:
/// <summary>
/// Default constructor.
/// Initializes a new instance of the PostData class.
/// </summary>
PostData()
{
Expand Down
2 changes: 1 addition & 1 deletion CefSharp.Core.Runtime/RequestContextSettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ namespace CefSharp

public:
/// <summary>
/// Default constructor
/// Initializes a new instance of the RequestContextSettings class.
/// </summary>
RequestContextSettings() : _settings(new CefRequestContextSettings())
{
Expand Down
2 changes: 1 addition & 1 deletion CefSharp/Callback/TaskCompletionCallback.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class TaskCompletionCallback : ICompletionCallback
private bool onComplete; //Only ever accessed on the same CEF thread, so no need for thread safety

/// <summary>
/// Default constructor
/// Initializes a new instance of the TaskCompletionCallback class.
/// </summary>
public TaskCompletionCallback()
{
Expand Down
2 changes: 1 addition & 1 deletion CefSharp/Callback/TaskDeleteCookiesCallback.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public class TaskDeleteCookiesCallback : IDeleteCookiesCallback
private bool onComplete; //Only ever accessed on the same CEF thread, so no need for thread safety

/// <summary>
/// Default constructor
/// Initializes a new instance of the TaskDeleteCookiesCallback class.
/// </summary>
public TaskDeleteCookiesCallback()
{
Expand Down
2 changes: 1 addition & 1 deletion CefSharp/Callback/TaskRegisterCdmCallback.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class TaskRegisterCdmCallback : IRegisterCdmCallback
private bool onComplete; //Only ever accessed on the same CEF thread, so no need for thread safety

/// <summary>
/// Default constructor
/// Initializes a new instance of the TaskRegisterCdmCallback class.
/// </summary>
public TaskRegisterCdmCallback()
{
Expand Down
2 changes: 1 addition & 1 deletion CefSharp/Callback/TaskResolveCallback.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class TaskResolveCallback : IResolveCallback
private bool onComplete; //Only ever accessed on the same CEF thread, so no need for thread safety

/// <summary>
/// Default constructor
/// Initializes a new instance of the TaskResolveCallback class.
/// </summary>
public TaskResolveCallback()
{
Expand Down
2 changes: 1 addition & 1 deletion CefSharp/Callback/TaskSetCookieCallback.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class TaskSetCookieCallback : ISetCookieCallback
private bool onComplete; //Only ever accessed on the same CEF thread, so no need for thread safety

/// <summary>
/// Default constructor
/// Initializes a new instance of the TaskSetCookieCallback class.
/// </summary>
public TaskSetCookieCallback()
{
Expand Down
2 changes: 1 addition & 1 deletion CefSharp/CefLibraryHandle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ private enum LoadLibraryFlags : uint
}

/// <summary>
/// Default constructor
/// Initializes a new instance of the CefLibraryHandle class.
/// </summary>
/// <param name="path">libcef.dll full path.</param>
public CefLibraryHandle(string path) : base(IntPtr.Zero, true)
Expand Down
3 changes: 3 additions & 0 deletions CefSharp/DevTools/Headers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ namespace CefSharp.DevTools.Network
/// Helper methods for dealing with comma separated header values based on https://github.com/dotnet/aspnetcore/blob/52eff90fbcfca39b7eb58baad597df6a99a542b0/src/Http/Http.Abstractions/src/Extensions/HeaderDictionaryExtensions.cs
public class Headers : Dictionary<string, string>
{
/// <summary>
/// Initializes a new instance of the Headers class.
/// </summary>
public Headers() : base(StringComparer.OrdinalIgnoreCase)
{
}
Expand Down
1 change: 1 addition & 0 deletions CefSharp/Handler/ContextMenuHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace CefSharp.Handler
{
/// <summary>
/// Inherit from this class to handle context menu events.
/// </summary>
public class ContextMenuHandler : IContextMenuHandler
Expand Down
3 changes: 1 addition & 2 deletions CefSharp/IResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@ public interface IResponse : IDisposable
string GetHeaderByName(string name);

/// <summary>
/// Set the header name to value. The Referer value cannot be set using this method.
/// Use <see cref="SetReferrer(string, ReferrerPolicy)"/> instead.
/// Set the header name to value.
/// </summary>
/// <param name="name">header name</param>
/// <param name="value">new header value</param>
Expand Down
2 changes: 1 addition & 1 deletion CefSharp/IWebBrowser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public interface IWebBrowser : IDisposable
/// <param name="url">url to load</param>
/// <param name="ctx">SynchronizationContext to execute the continuation on, if null then the ThreadPool will be used.</param>
/// <returns>
/// A <see cref="Task{int}"/> that can be awaited to load the <paramref name="url"/> and return the HttpStatusCode and <see cref="CefErrorCode"/>.
/// A <see cref="Task{LoadUrlAsyncResponse}"/> that can be awaited to load the <paramref name="url"/> and return the HttpStatusCode and <see cref="CefErrorCode"/>.
/// A HttpStatusCode equal to 200 and <see cref="CefErrorCode.None"/> is considered a success.
/// </returns>
Task<LoadUrlAsyncResponse> LoadUrlAsync(string url = null, SynchronizationContext ctx = null);
Expand Down
2 changes: 1 addition & 1 deletion CefSharp/Internals/ParentProcessMonitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public static class ParentProcessMonitor
{
/// <summary>
/// Starts a long running task (spawns new thread) used to monitor the parent process
/// and calls <see cref="Process.Kill"/> if the parent exits unexpectedly (usually result of a crash).
/// and calls <see cref="Process.Kill()"/> if the parent exits unexpectedly (usually result of a crash).
/// </summary>
/// <param name="parentProcessId">process Id of the parent application</param>
public static void StartMonitorTask(int parentProcessId)
Expand Down
2 changes: 1 addition & 1 deletion CefSharp/Internals/TaskExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public static void TrySetResultAsync<TResult>(this TaskCompletionSource<TResult>
/// </summary>
/// <typeparam name="TResult">Generic param</typeparam>
/// <param name="taskCompletionSource">tcs</param>
/// <param name="result">result</param>
/// <param name="ex">exception</param>
public static void TrySetExceptionAsync<TResult>(this TaskCompletionSource<TResult> taskCompletionSource, Exception ex)
{
Task.Factory.StartNew(delegate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ string IJavascriptNameConverter.ConvertReturnedObjectPropertyAndFieldToNameJavas
/// only the bound methods/fields/properties were converted. Objects returned
/// from a method call were not translated. To preserve this functionality
/// for upgrading users we split this into two methods. Typically thie method
/// would return the same result as <see cref="ConvertToJavascript(string)"/>
/// would return the same result as <see cref="ConvertToJavascript(MemberInfo)"/>
/// Issue #2442
/// </summary>
/// <param name="memberInfo">property/field/method</param>
Expand Down
2 changes: 1 addition & 1 deletion CefSharp/JavascriptBinding/IJavascriptNameConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public interface IJavascriptNameConverter
/// only the bound methods/fields/properties were converted. Objects returned
/// from a method call were not translated. To preserve this functionality
/// for upgrading users we split this into two methods. Typically thie method
/// would return the same result as <see cref="ConvertToJavascript(string)"/>
/// would return the same result as <see cref="ConvertToJavascript(MemberInfo)"/>
/// Issue #2442
/// </summary>
/// <param name="memberInfo">property/field/method</param>
Expand Down
2 changes: 1 addition & 1 deletion CefSharp/LoadUrlAsyncResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public bool Success
}

/// <summary>
/// Default constructor
/// Initializes a new instance of the LoadUrlAsyncResponse class.
/// </summary>
/// <param name="errorCode">CEF Error Code</param>
/// <param name="httpStatusCode">Http Status Code</param>
Expand Down
4 changes: 4 additions & 0 deletions CefSharp/ModelBinding/DefaultBinder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ public class DefaultBinder : IBinder
private static readonly MethodInfo ToArrayMethodInfo = typeof(Enumerable).GetMethod("ToArray", BindingFlags.Public | BindingFlags.Static);
private readonly IJavascriptNameConverter javascriptNameConverter;

/// <summary>
/// Javascript Binder
/// </summary>
/// <param name="javascriptNameConverter">name converter</param>
public DefaultBinder(IJavascriptNameConverter javascriptNameConverter = null)
{
this.javascriptNameConverter = javascriptNameConverter;
Expand Down
2 changes: 1 addition & 1 deletion CefSharp/Preferences/SetPreferenceResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class SetPreferenceResponse
public string ErrorMessage { get; private set; }

/// <summary>
/// Default constructor
/// Initializes a new instance of the SetPreferenceResponse class.
/// </summary>
/// <param name="success">success</param>
/// <param name="errorMessage">error message</param>
Expand Down
6 changes: 3 additions & 3 deletions CefSharp/Preferences/SetProxyResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
namespace CefSharp.Preferences
{
/// <summary>
/// Response when <see cref="RequestContextExtensions.SetProxyAsync(IRequestContext, string, string, int?, out string)"/>
/// is called.
/// Response when either <see cref="RequestContextExtensions.SetProxyAsync(IRequestContext, string, int?)"/>
/// or <see cref="RequestContextExtensions.SetProxyAsync(IRequestContext, string, string, int?)"/> are called.
/// </summary>
public class SetProxyResponse : SetPreferenceResponse
{
/// <summary>
/// Default constructor
/// Initializes a new instance of the SetProxyResponse class.
/// </summary>
/// <param name="success">success</param>
/// <param name="errorMessage">error message</param>
Expand Down
9 changes: 9 additions & 0 deletions CefSharp/RenderProcess/IV8Context.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@

namespace CefSharp.RenderProcess
{
/// <summary>
/// V8 context handle.
/// V8 handles can only be accessed from the thread on which they are created.
/// Valid threads for creating a V8 handle include the render process main thread (TID_RENDERER) and WebWorker threads.
/// A task runner for posting tasks on the associated thread can be retrieved via the CefV8Context::GetTaskRunner() method.
/// </summary>
/// <remarks>
/// V8 is Google’s open source high-performance JavaScript and WebAssembly engine.
/// </remarks>
public interface IV8Context
{
/// <summary>
Expand Down
14 changes: 14 additions & 0 deletions CefSharp/RenderProcess/V8Exception.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ namespace CefSharp.RenderProcess
/// <summary>
/// Class representing a V8 exception.
/// </summary>
/// <remarks>
/// V8 is Google’s open source high-performance JavaScript and WebAssembly engine.
/// </remarks>
public class V8Exception
{
/// <summary>
Expand Down Expand Up @@ -57,6 +60,17 @@ public class V8Exception
/// <returns>Returns the index within the script of the first character where the error occurred.</returns>
public int StartPosition { get; private set; }

/// <summary>
/// V8 Exception
/// </summary>
/// <param name="endColumn">index within the line of the last character where the error occurred.</param>
/// <param name="endPosition">index within the script of the last character where the error occurred.</param>
/// <param name="lineNumber">1-based number of the line where the error occurred or 0 if the line number is unknown.</param>
/// <param name="message">exception message.</param>
/// <param name="scriptResourceName">resource name for the script from where the function causing the error originates.</param>
/// <param name="sourceLine">line of source code that the exception occurred within.</param>
/// <param name="startColumn">index within the line of the first character where the error occurred.</param>
/// <param name="startPosition">index within the script of the first character where the error occurred.</param>
public V8Exception(int endColumn,
int endPosition,
int lineNumber,
Expand Down
1 change: 0 additions & 1 deletion CefSharp/RequestContextExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ public static void LoadExtensionsFromDirectory(this IRequestContext requestConte
/// <param name="requestContext">request context</param>
/// <param name="name">preference key</param>
/// <param name="value">preference value</param>
/// <param name="error">out error</param>
/// <returns>returns <see cref="SetPreferenceResponse.Success"/> true if successfull, false otherwise.</returns>
/// <remarks>Use Cef.UIThreadTaskFactory to execute this method if required,
/// <see cref="IBrowserProcessHandler.OnContextInitialized"/> and ChromiumWebBrowser.IsBrowserInitializedChanged are both
Expand Down
4 changes: 4 additions & 0 deletions CefSharp/SchemeHandler/OwinResourceHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ public class OwinResourceHandler : ResourceHandler

private readonly AppFunc appFunc;

/// <summary>
/// OwinResourceHandler
/// </summary>
/// <param name="appFunc">Owin pipeline func</param>
public OwinResourceHandler(AppFunc appFunc)
{
this.appFunc = appFunc;
Expand Down
5 changes: 5 additions & 0 deletions CefSharp/SchemeHandler/OwinSchemeHandlerFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,16 @@ public class OwinSchemeHandlerFactory : ISchemeHandlerFactory
{
private readonly AppFunc appFunc;

/// <summary>
/// OwinSchemeHandlerFactory
/// </summary>
/// <param name="appFunc">Owin pipeline func</param>
public OwinSchemeHandlerFactory(AppFunc appFunc)
{
this.appFunc = appFunc;
}

/// <inheritdoc/>
public IResourceHandler Create(IBrowser browser, IFrame frame, string schemeName, IRequest request)
{
return new OwinResourceHandler(appFunc);
Expand Down
4 changes: 3 additions & 1 deletion CefSharp/Visitor/TaskCookieVisitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,15 @@ public class TaskCookieVisitor : ICookieVisitor
private List<Cookie> list;

/// <summary>
/// Default constructor
/// Initializes a new instance of the TaskCookieVisitor class.
/// </summary>
public TaskCookieVisitor()
{
taskCompletionSource = new TaskCompletionSource<List<Cookie>>();
list = new List<Cookie>();
}

/// <inheritdoc/>
bool ICookieVisitor.Visit(Cookie cookie, int count, int total, ref bool deleteCookie)
{
list.Add(cookie);
Expand All @@ -40,6 +41,7 @@ bool ICookieVisitor.Visit(Cookie cookie, int count, int total, ref bool deleteCo
return true;
}

/// <inheritdoc/>
void IDisposable.Dispose()
{
if (list != null && list.Count == 0)
Expand Down
8 changes: 5 additions & 3 deletions CefSharp/Visitor/TaskNavigationEntryVisitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,30 +10,32 @@
namespace CefSharp
{
/// <summary>
/// A <see cref="INavigationEntryVisitor"/> that uses a TaskCompletionSource
/// to simplify things
/// A <see cref="INavigationEntryVisitor"/> implementation that uses a <see cref="TaskCompletionSource{TResult}"/>
/// that allows you to call await/ContinueWith to get the list of NavigationEntries
/// </summary>
public class TaskNavigationEntryVisitor : INavigationEntryVisitor
{
private TaskCompletionSource<List<NavigationEntry>> taskCompletionSource;
private List<NavigationEntry> list;

/// <summary>
/// Default constructor
/// Initializes a new instance of the TaskNavigationEntryVisitor class.
/// </summary>
public TaskNavigationEntryVisitor()
{
taskCompletionSource = new TaskCompletionSource<List<NavigationEntry>>();
list = new List<NavigationEntry>();
}

/// <inheritdoc/>
bool INavigationEntryVisitor.Visit(NavigationEntry entry, bool current, int index, int total)
{
list.Add(entry);

return true;
}

/// <inheritdoc/>
void IDisposable.Dispose()
{
if (list != null)
Expand Down
6 changes: 3 additions & 3 deletions CefSharp/Visitor/TaskStringVisitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
namespace CefSharp
{
/// <summary>
/// A <see cref="IStringVisitor"/> that uses a TaskCompletionSource
/// to simplify things
/// A <see cref="IStringVisitor"/> that uses a <see cref="TaskCompletionSource{TResult}"/>
/// that allows you to call await/ContinueWith to get the result string.
/// </summary>
public class TaskStringVisitor : IStringVisitor
{
private readonly TaskCompletionSource<string> taskCompletionSource;

/// <summary>
/// Default constructor
/// Initializes a new instance of the TaskStringVisitor class.
/// </summary>
public TaskStringVisitor()
{
Expand Down
4 changes: 4 additions & 0 deletions CefSharp/Web/JsonString.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ namespace CefSharp.Web
/// </summary>
public class JsonString
{
/// <summary>
/// JSON String
/// </summary>
public string Json { get; private set; }

/// <summary>
Expand All @@ -31,6 +34,7 @@ public JsonString(string json)
Json = json;
}

/// <inheritdoc/>
public override string ToString()
{
return Json;
Expand Down

0 comments on commit 1d1b6f2

Please sign in to comment.