[英]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:)谢谢:)
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 中的应用程序启动,更详细地介绍了它。
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.