This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using Microsoft.CodeAnalysis; | |
| using Microsoft.CodeAnalysis.CSharp.Syntax; | |
| using Microsoft.CodeAnalysis.Diagnostics; | |
| using System.Collections.Immutable; | |
| using System.Linq; | |
| namespace Analyzer1 | |
| { | |
| [DiagnosticAnalyzer(LanguageNames.CSharp)] | |
| public class BasePageViewModelAnalyzer : DiagnosticAnalyzer |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static Task BasicHttpServer(string url, string outputHtml) | |
| { | |
| return Task.Run(() => | |
| { | |
| HttpListener listener = new HttpListener(); | |
| listener.Prefixes.Add(url); | |
| listener.Start(); | |
| // GetContext method blocks while waiting for a request. | |
| HttpListenerContext context = listener.GetContext(); |