External Url Registration - RupertAvery/Chromely GitHub Wiki
Chromely allows custom url to be registered. This is different from custom scheme handling registration.
There are 2 types of custom urls:
- Custom url
- External custom url
A class is provided to instantiate a custom url.
public class UrlScheme
{
....
public string Scheme { get; set; }
public string Host { get; set; }
public bool IsExternal { get; set; }
....
}
where IsExternal determines whether it is custom scheme or an external scheme.
Custom Url Scheme
This is left to the developer to decide what it could be used for.
A custom url scheme is registered in ChromelyConfiguration.
ChromelyConfiguration config = ChromelyConfiguration()
.Create()
....
.RegisterCustomrUrlScheme("http", "chromely.com")
.RegisterCustomrUrlScheme("test", "test.com")
.....
External Url Scheme
An external url is used to launch a url/website in an external browser. As the examples below, both www.google.com and https://github.com/mattkol/Chromely will be launched in an external default browser.
A custom external url scheme is registered in ChromelyConfiguration.
ChromelyConfiguration config = ChromelyConfiguration()
.Create()
....
.RegisterExternaleUrlScheme("https", "google.com")
.RegisterExternaleUrlScheme("https", "github.com")
.....