gpt4 book ai didi

.NET 标准 API 引用

转载 作者:行者123 更新时间:2023-12-03 20:52:14 24 4
gpt4 key购买 nike

更新:

所以它似乎是 open issue现在。所以我想在这完成之前我将不得不依赖 .NET Core API reference并祈祷我不会击中 43 APIs that .NET Framework 4.6.1 doesn't support 之一但官方应该是...

同样依赖 .NET Core API 引用并考虑与 .NET 标准相同可能会非常令人惊讶。例如,当我查看命名空间列表时,我可以看到 System.Drawing但是当点击它时,我们意识到这是一个 almost empty namespace仅包含 6 个结构。

有几个这样的命名空间吗?我不知道,我必须比较 .NET core 和 .NET Framework 文档才能得到答案。

原帖:

我正在尝试查找 .NET Standard API 引用。

this page只有 .NET Core API reference 的链接和 .NET Framework API reference .

是的,我已经搜索过并且我已经阅读了其他 SO 问题。例如 this answer指向 .NET Core API 引用而不是 .NET 标准,在此 Github issue feed 中相同

但是 .NET Core 和 .NET Standard 是不同的。 .NET Core 是 .NET Standard API 的实现。

我在这里看到的一个大问题是例如基于 official documentation .NET Framework 4.6.1 将实现 .NET Standard 2.0

enter image description here

好的,除了 .NET Standard Github readme page也在说

On the other hand, .NET Standard 2.0 adds many APIs that .NET Framework 4.6.1 already supports. The delta looks as follows:

  • .NET Standard 2.0 adds 14,994 APIs that .NET Framework 4.6.1 already supports

  • .NET Standard 2.0 only has 43 APIs that .NET Framework 4.6.1 doesn't support Originally, we planned to simply elide those APIs from .NET Standard 2.0 in order to make it easier to understand what will work on .NET Framework 4.6.1.

However, we got a lot of feedback around this. You told us that this decision makes it really hard to reason about .NET Standard versioning rules. Thus, we decided to simplify this:

  • .NET Standard 2.0 will be a strict superset of .NET Standard 1.6. In other words, no breaking changes will happen between .NET Standard 2.0 and 1.x.

  • .NET Framework 4.6.1 will allow referencing binaries that are compiled against .NET Standard 2.0. Considering the number of APIs that .NET Framework 4.6.1 will not support is low and that these are all brand-new APIs with low adoption we believe this is a much better trade-off.

You can use API Port to scan a given application to make sure no code in your application depends on these APIs.



所以呢?他们对这个问题的解决方案是 to scan a given application ?因此,如果我开始一个新项目,考虑到我还没有编写代码这一事实,我会以 .NET Standard 为目标,并祈祷我最终不会得到本应不受支持的 API?

此外,在 Xamarin 或 UWP 等其他框架中是否还有其他类似的情况?这是什么意思 vNext正好在 2.0 列?我是否应该担心其他框架中其他不受支持的 API,因为 Considering the number of APIs that [Framework name] will not support is low and that these are all brand-new APIs with low adoption we believe this is a much better trade-off ?

我能找到的最接近这个问题的答案是查看 NETStandard.Library NuGet package的依赖。但是,这给了我 1.3 版本的依赖项(不是 1.6,或者我不太了解本节),并且没有给我应该已经确定的下一个 2.0 的 API 引用。

我们不能有完整的 API 记录列表吗 真的每个 .NET Standard 版本都支持吗? .NET Standard 的唯一目标是为开发人员提供这些非常重要的信息,为什么我找不到呢?

最佳答案

正如 Martin 在 his comment 中提到的那样, .NET API Browser正是我前一段时间一直在寻找的。

您可以使用 .NET 标准 API 或任何框架实现进行选择和过滤,甚至可以选择任何版本。太完美了,微软应该早点做到这一点。

关于.NET 标准 API 引用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40923831/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com