Welcome to mirror list, hosted at ThFree Co, Russian Federation.

DebuggerProxy.cs « BrowserDebugProxy « wasm « sdks - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 08fe836200dcdcb93a765d9b11be789edbb4a2b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System;
using System.Net.WebSockets;
using System.Threading.Tasks;
using Microsoft.Extensions.Logging;

namespace Microsoft.WebAssembly.Diagnostics
{

    // This type is the public entrypoint that allows external code to attach the debugger proxy
    // to a given websocket listener. Everything else in this package can be internal.

    public class DebuggerProxy
    {
        private readonly MonoProxy proxy;

        public DebuggerProxy(ILoggerFactory loggerFactory)
        {
            proxy = new MonoProxy(loggerFactory);
        }

        public Task Run(Uri browserUri, WebSocket ideSocket)
        {
            return proxy.Run(browserUri, ideSocket);
        }
    }
}