Commit cdd8aa9c authored by Honfika's avatar Honfika

async invoke

parent 84d4effc
......@@ -88,7 +88,7 @@ namespace Titanium.Web.Proxy.Examples.Wpf
private async Task ProxyServer_TunnelConnectRequest(object sender, TunnelConnectSessionEventArgs e)
{
Dispatcher.Invoke(() =>
await Dispatcher.InvokeAsync(() =>
{
AddSession(e);
});
......@@ -96,7 +96,7 @@ namespace Titanium.Web.Proxy.Examples.Wpf
private async Task ProxyServer_TunnelConnectResponse(object sender, SessionEventArgs e)
{
Dispatcher.Invoke(() =>
await Dispatcher.InvokeAsync(() =>
{
SessionListItem item;
if (sessionDictionary.TryGetValue(e, out item))
......@@ -113,7 +113,7 @@ namespace Titanium.Web.Proxy.Examples.Wpf
private async Task ProxyServer_BeforeRequest(object sender, SessionEventArgs e)
{
SessionListItem item = null;
Dispatcher.Invoke(() =>
await Dispatcher.InvokeAsync(() =>
{
item = AddSession(e);
});
......@@ -127,7 +127,7 @@ namespace Titanium.Web.Proxy.Examples.Wpf
private async Task ProxyServer_BeforeResponse(object sender, SessionEventArgs e)
{
SessionListItem item = null;
Dispatcher.Invoke(() =>
await Dispatcher.InvokeAsync(() =>
{
SessionListItem item2;
if (sessionDictionary.TryGetValue(e, out item2))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment