Skip to content

Commit

Permalink
Core - Make ObjectFactory types readonly
Browse files Browse the repository at this point in the history
  • Loading branch information
amaitland committed Jan 12, 2021
1 parent 83d960e commit 66228eb
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions CefSharp.Core/ObjectFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,14 @@

namespace CefSharp.Core
{
/// <summary>
/// Create instances of Public Api classes, <see cref="IBrowserSettings"/>,
/// <see cref="IWindowInfo"/> etc.
/// </summary>
public static class ObjectFactory
{
public static Type BrowserSetingsType = typeof(CefSharp.Core.BrowserSettings);
public static Type RequestContextType = typeof(CefSharp.Core.RequestContext);
public static readonly Type BrowserSetingsType = typeof(CefSharp.Core.BrowserSettings);
public static readonly Type RequestContextType = typeof(CefSharp.Core.RequestContext);

/// <summary>
/// Create a new instance of <see cref="IBrowserSettings"/>
Expand Down Expand Up @@ -81,5 +85,14 @@ public static IUrlRequest CreateUrlRequest(IRequest request, IUrlRequestClient u
{
return new CefSharp.Core.UrlRequest(request, urlRequestClient, requestContext);
}

/// <summary>
/// Create a new instance of <see cref="IDragData"/>
/// </summary>
/// <returns>returns new instance of <see cref="IDragData"/></returns>
public static IDragData CreateDragData()
{
return Core.DragData.Create();
}
}
}

0 comments on commit 66228eb

Please sign in to comment.