Exemplo n.º 1
0
 private void logBrowserToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (logBrowser.IsDisposed)
     {
         logBrowser = new LogBrowser();
     }
     logBrowser.Show();
     logBrowser.Focus();
 }
Exemplo n.º 2
0
    public async Task <IActionResult> Index([FromServices] LogBrowser logBrowser)
    {
        string fullpath = Request._GetRequestPathAndQueryString();

        if (fullpath._TryTrimStartWith(out string path, StringComparison.OrdinalIgnoreCase, Consts.UrlPaths.LogBrowserMvcPath) == false)
        {
            return(new ContentResult {
                Content = "Invalid URL", ContentType = "text/plain", StatusCode = 404
            });
        }