Repository navigation
Made it possible to register a "one-time use" ResourceHandler - #2010
Conversation
ResourceFactoryItem renamed to DefaultResourceHandlerFactory - it's only used in the context of that class Change persist to OneTimeUse and invert logic (false is the default) Remove unnecessary RegisterHandler overload - user default value instead
|
Follow up commit is d03e4a4 Are you in a hurry to see this merged into |
| /// <param name="url">url</param> | ||
| /// <param name="handler">handler</param> | ||
| /// <returns>returns true if the Url was successfully parsed into a Uri otherwise false</returns> | ||
| public virtual bool RegisterHandler(string url, IResourceHandler handler) |
There was a problem hiding this comment.
Removed unnecessary overload, can use a default value instead.
|
|
||
| namespace CefSharp | ||
| { | ||
| public class ResourceFactoryItem |
There was a problem hiding this comment.
Renamed class, as it's only used in the context of DefaultResourceHandlerFactory.
|
Marking this as |
| } | ||
|
|
||
| if (resourceHandler.RegisterHandler(url, ResourceHandler.FromString(html, encoding, true))) | ||
| if (resourceHandler.RegisterHandler(url, ResourceHandler.FromString(html, encoding, true), false)) |
There was a problem hiding this comment.
Whilst this change makes sense it is however a subtle change in behavior and could potentially bring some existing users unstuck. There's now a oneTimeUse param with a default value as part of LoadHtml.
I build CefSharp from master so that's all up to you ๐ |
ResourceFactoryItemclassRegisterHandlerthat takes a bool representing whether or not the handler should be used only onceGetResourceHandlerremove theResourceFactoryItemif it was specified as aone-time usehandlerone-time usehandler