C# 如何实现ResourceInterceptor Awesomium 1.7.1
我在这条线上看到了这个问题 基本上我想知道如何实现资源拦截器,因为我找不到它。。我也在使用c,我在对象浏览器中搜索,但没有找到类 这是我的密码。。或多或少与上面的线程相同C# 如何实现ResourceInterceptor Awesomium 1.7.1,c#,.net,awesomium,C#,.net,Awesomium,我在这条线上看到了这个问题 基本上我想知道如何实现资源拦截器,因为我找不到它。。我也在使用c,我在对象浏览器中搜索,但没有找到类 这是我的密码。。或多或少与上面的线程相同 这不起作用,有什么建议吗?这是一个使用.NET4/x86的工作示例: public class customInter : IResourceInterceptor { public ResourceResponse OnRequest(ResourceRequest request) { /
这不起作用,有什么建议吗?这是一个使用.NET4/x86的工作示例:
public class customInter : IResourceInterceptor
{
public ResourceResponse OnRequest(ResourceRequest request)
{
// Put your code here
return null;
}
public bool OnFilterNavigation(NavigationRequest request)
{
return false;
}
}
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
private void WebCoreOnStarted(object sender,
CoreStartEventArgs coreStartEventArgs)
{
var interc = new customInter();
WebCore.ResourceInterceptor = interc;
}
private void button1_Click(object sender, RoutedEventArgs e)
{
var interc = new customInter();
WebCore.ResourceInterceptor = interc;
// Replace "webControl1" and Uri with your information
this.webControl1.Source = new Uri("http://example-site.com");
}
}
以下是使用.NET4/x86的工作示例:
public class customInter : IResourceInterceptor
{
public ResourceResponse OnRequest(ResourceRequest request)
{
// Put your code here
return null;
}
public bool OnFilterNavigation(NavigationRequest request)
{
return false;
}
}
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
private void WebCoreOnStarted(object sender,
CoreStartEventArgs coreStartEventArgs)
{
var interc = new customInter();
WebCore.ResourceInterceptor = interc;
}
private void button1_Click(object sender, RoutedEventArgs e)
{
var interc = new customInter();
WebCore.ResourceInterceptor = interc;
// Replace "webControl1" and Uri with your information
this.webControl1.Source = new Uri("http://example-site.com");
}
}