简体   繁体   English

如何知道在 ASP.net 内核中使用了哪些函数以及我可以使用哪些函数(逆向工程)

[英]How to know which functions are used and which can I use (reverse engineering) in ASP.net core

I'm completely new using ASP.net core.我是使用 ASP.net 内核的新手。 I've read the "base notion" on the MSDN website and I'm currently following this tutorial https://docs.microsoft.com/fr-fr/aspnet/core/tutorials/razor-pages/?view=aspnetcore-3.0我已经阅读了 MSDN 网站上的“基本概念”,我目前正在关注本教程https://docs.microsoft.com/fr-fr/aspnet/core/tutorials/razor-pages/?view=aspnetcore- 3.0

Usually when I try to understand the workflow of a program, the VS code lens and autocompletion help me a lot.通常当我尝试理解程序的工作流程时,VS 代码镜头和自动补全对我有很大帮助。 Unfortunately in ASP.net it seems that all the functions are called via external code and then code lens does not reference those functions.不幸的是,在 ASP.net 中,似乎所有函数都是通过外部代码调用的,然后代码镜头不引用这些函数。 For example, in the class Startup :例如,在 class启动中: 在此处输入图像描述

But they are called during runtime (even with the stacktrace I cannot get the functions that called those methods).但是它们在运行时被调用(即使使用堆栈跟踪我也无法获得调用这些方法的函数)。 Unfortunately the names are strongly typed so if I use ConfigServices instead of ConfigureServices, the method is obviously not called.不幸的是,名称是强类型的,因此如果我使用 ConfigServices 而不是 ConfigureServices,则显然不会调用该方法。 I thought that the Microsoft developers would have created an interface that gathered all those methods.我认为 Microsoft 开发人员会创建一个接口来收集所有这些方法。 Because at the time being I'm completely lost.因为当时我完全迷路了。 Indeed it's even harder to understand something when parts that you are looking for are not glued together:/.事实上,当您正在寻找的部分没有粘在一起时,更难理解一些东西:/。 Following the tutorial is OK but if I want to write code myself I will probably not find the functions I'll need and in the end I'll end up with poor code because of my not understanding.遵循教程是可以的,但如果我想自己编写代码,我可能找不到我需要的功能,最后我会因为我不理解而得到糟糕的代码。

My question is then: Where can I find the entire flow of ASP.net?那么我的问题是:我在哪里可以找到 ASP.net 的整个流程? Which documentation should I read?我应该阅读哪些文档? Where are all those functions called?所有这些函数在哪里调用? Is there a way to get all the workflow in VS2019?有没有办法在 VS2019 中获取所有工作流程?

Maybe my approach to understand how asp.net works is not the correct one.也许我理解 asp.net 工作原理的方法不是正确的。 Which method/tutorials/doc should I use?我应该使用哪种方法/教程/文档?

Thank you:)谢谢:)

Documentation文档

You could start with the Overview from ASP.NET Core fundamentals which is the first of pages that cover how elements of ASP.NET Core work.您可以从ASP.NET 核心基础的概述开始,这是介绍 ASP.NET 核心的元素如何工作的第一页。

The page actually start with the startup class, but the 2nd page in the series, App startup in ASP.NET Core , covers it with even more detail.该页面实际上以启动 class 开头,但该系列的第二页,ASP.NET Core 中的应用程序启动,更详细地介绍了它。

Under the hood在引擎盖下

If you want to look under the hood then you're in luck ASP.Core is Open Source - the repo is here如果您想深入了解,那么您很幸运 ASP.Core 是开源的 - 回购协议就在这里

You can also browse the .NET Core Source Browser .您还可以浏览.NET Core Source Browser

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 我可以在非 ASP.NET Core 的 .NET.core 应用程序中使用 HttpClientFactory 吗? - Can I use HttpClientFactory in a .NET.core app which is not ASP.NET Core? 如何在 asp.net 核心 1.0 c# 中将字符串(实际上是位图)转换为 IFormFile - How can I convert String (which is actually Bitmap) to IFormFile in asp.net core 1.0 c# 当我向 Web API Controller 中的 Z9E0DA8438E1E38A8DDZCE7C30 中的 Web 发送多部分请求时使用哪种格式化程序? - Which formatter is used when I send a multipart request to a Web API Controller in ASP.NET CORE? 实体框架7逆向工程ASP.NET 5 - Entity Framework 7 Reverse Engineering ASP.NET 5 逆向工程asp.net网络应用程序 - Reverse Engineering asp.net web app 在没有 .NET 可移植性分析器或 VS 的情况下,我如何知道 asp.net 包与 .net 内核的兼容性 - How can I know the compatibility of the asp.net packages to .net core without .NET Portability Analyzer or VS ASP.NET中的ModelStateDictionary如何知道要验证的模型? - How does the ModelStateDictionary in ASP.NET know which model to validate? 如何知道在asp.net的ListView中选择了哪个项目 - How to know which item is selected in the ListView in asp.net 如何知道在asp.net中单击了哪个随机图像 - how to know which random image is clicked in asp.net 如何知道在哪一行点击了按钮 asp.net gridView - How to know in which row a button is clicked in asp.net gridView
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM