小编Car*_*cia的帖子

C# 中同一语句中的多个异步调用

即使第一个返回 false,是否所有调用都发生了?第二个是否在等待第一个?

if (await callAsync() && await callAsync()) {...}

if (await callAsync() & await callAsync()) {...}

if (await callAsync() || await callAsync()) {...}

c#

4
推荐指数
1
解决办法
64
查看次数

发现 DotNet 无效证书

我已经多次看到这个问题,但没有一个答案对我有用。我的 DotNet Core 应用程序失败

编码:

    public static void Main(string[] args)
    {
        CreateHostBuilder(args).Build().Run();
    }
Run Code Online (Sandbox Code Playgroud)

错误:

System.InvalidOperationException
  HResult=0x80131509
  Message=Unable to configure HTTPS endpoint. No server certificate was specified, and the default developer certificate could not be found or is out of date.
To generate a developer certificate run 'dotnet dev-certs https'. To trust the certificate (Windows and macOS only) run 'dotnet dev-certs https --trust'.
For more information on configuring HTTPS see https://go.microsoft.com/fwlink/?linkid=848054.
  Source=Microsoft.AspNetCore.Server.Kestrel.Core

This exception was originally thrown at this call stack: …
Run Code Online (Sandbox Code Playgroud)

c# https .net-core

4
推荐指数
1
解决办法
1456
查看次数

[40m[32minfo[39m[22m[49m] 在 DotNetCore 日志上意味着什么

我在 Docker 容器内有一个 DotNet Core 应用程序,当我查看 ILogger 生成的日志时,我可以看到这些字符:

[40m[32minfo[39m[22m[49m: Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker[1] 
[40m[32minfo[39m[22m[49m: Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker[2] 

Run Code Online (Sandbox Code Playgroud)

你能帮我理解它们的意思吗?

c# .net-core ilogger

3
推荐指数
1
解决办法
3342
查看次数

演示处理器环-运行环0指令的汇编代码

我想创建一个演示,向学生解释处理器振铃和系统调用。我在一个演示文稿中正在考虑做这样的事情:

  1. 编写一些汇编代码,尝试执行一些只能在环0中运行的代码(例如,直接访问磁盘)
  2. 查看失败的代码,然后将其重写以使用系统调用(例如,使用系统调用读取文件)
  3. 如果不是那么难:在环0中运行初始代码

我可以使用Linux或Windows,更容易

关于在哪里可以找到有助于我的代码的任何想法?我可以使用哪些受保护的说明?

谢谢!

assembly cpu-architecture linux-device-driver

2
推荐指数
1
解决办法
91
查看次数