public static WebBrowserProtocolFactory Register_ResourceProtocol(this HProtocolBuilder builder, System.Resources.ResourceManager resourceManager, string protocolPrefix = "nres") { return(builder.Register(protocolPrefix, (url, context) => (byte[])resourceManager.GetObject(url.Substring(context.ProtocolPrefix.Length + 3).Trim('/', '\\').Replace('.', '_')))); }
public static WebBrowserProtocolFactory Register(this HProtocolBuilder builder, string protocolPrefix, Func <string, WebBrowserProtocolReaderContext, byte[]> reader, Guid?protocolId = null) { return(WebBrowserProtocolFactory.Register(protocolPrefix, reader, protocolId)); }