https://github.com/mganss/asyncpluggableprotocol
C# Asynchronous Pluggable Protocol Handler
https://github.com/mganss/asyncpluggableprotocol
Last synced: 5 months ago
JSON representation
C# Asynchronous Pluggable Protocol Handler
- Host: GitHub
- URL: https://github.com/mganss/asyncpluggableprotocol
- Owner: mganss
- License: other
- Created: 2013-07-30T16:27:12.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2015-02-14T20:39:13.000Z (over 10 years ago)
- Last Synced: 2023-04-10T14:42:24.192Z (over 2 years ago)
- Language: C#
- Size: 133 KB
- Stars: 16
- Watchers: 2
- Forks: 8
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
Handle custom protocol schemes when you are using the `WebBrowser` control in a Windows Forms (or WPF) desktop application.
```C#
ProtocolFactory.Register("rsrc", () => new ResourceProtocol());
var html = @"";
Browser.DocumentText = html;
```The `ResourceProtocol` class in the example above implements the following interface to deliver embedded resources to the browser control:
```C#
public interface IProtocol
{
string Name { get; }
Task GetStreamAsync(string url);
}
```