我使用Visual Studio 2008到2017,所有这些功能如下所示:
的黄色箭头(调试指针),其可以用于操作同时执行调试线(或执行流),从而允许用户简单地通过使用鼠标移动的箭头.
在Visual Studio Code中,箭头用于显示执行行,如下所示:
但它(调试指针)无法使用鼠标进行操作或移动,以在调试时更改执行行(或执行流程).
是否有任何设置必须在Visual Studio代码中更改才能启用此功能?
在ASP.NET Core 2.0没有必要对包括个体package references中.csproj的文件.Microsoft.AspNetCore.Allmetapackage包含所有必需的包.我们可以将这个元数据包包含在.csproj文件中:
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.0" />
Run Code Online (Sandbox Code Playgroud)
.Net Core应用程序中这个元数据包的主要优点和缺点是什么?(也考虑跨平台自包含的应用程序)
我在哪里可以创建多个长时间运行的后台线程,Self Hosted Self Contained ASP.NET Core Microservice其生命周期与微服务生命周期相同?因此,从线程检索的信息可以作为对请求的响应发送.
尝试给定代码,但它在后台线程忙时减少了http请求性能.Program.cs文件的主要方法是:
static void Main(string[] args)
{
//Start background thread1
//Start background thread2
//Around 10 background threads
//Start host
var host = new WebHostBuilder()
.UseKestrel()
.UseUrls(ServerUrl)
.UseConfiguration(config)
.UseContentRoot(Directory.GetCurrentDirectory())
.UseIISIntegration()
.ConfigureServices(s => s.AddRouting())
.Configure(app => app.UseRouter(r => { (new Router()).Route(r); }))
.Build();
host.Run();
}
Run Code Online (Sandbox Code Playgroud)
线程以这种方式工作:
Thread t1 = new Thread(StartWork);
t1.IsBackground = true;
t1.Start();
public void StartWork()
{
while (ApplicationIsRunning)
{
//Get database info >> login into remote devices (SSH) >> get information …Run Code Online (Sandbox Code Playgroud) c# multithreading .net-core kestrel-http-server asp.net-core