Skip to content

Commit ae5caec

Browse files
committed
Update docs.
1 parent a9a4cb0 commit ae5caec

5 files changed

Lines changed: 41 additions & 130 deletions

File tree

README.md

Lines changed: 11 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,31 @@
11
# Latest CSharp Features
22

3-
| Language |
4-
| --- |
3+
| Language |
4+
| ---------------------------------- |
55
| [简体中文](/docs/README.zh-CHS.md) |
66
| [繁體中文](/docs/README.zh-CHT.md) |
7-
| [English](/README.md) |
8-
| [日本語](/docs/README.jp.md) |
7+
| [English](/README.md) |
98

10-
This open-source project provides a series of NuGet packages that allow you to use the latest C# language features in older versions of .NET (including older .NET Framework, .NET Standard, as well as older .NET Core App, .NET).
9+
[![NuGet](https://img.shields.io/nuget/v/dotnetCampus.LatestCSharpFeatures.svg)](https://www.nuget.org/packages/dotnetCampus.LatestCSharpFeatures)
1110

12-
## NuGet Packages
13-
14-
We currently offer 8 NuGet packages for you to choose from based on your needs.
15-
16-
|Package Name|Function|Link|
17-
|---|---|---|
18-
|dotnetCampus.LatestCSharpFeatures|All-in-one package, includes all new C# features|[![NuGet](https://img.shields.io/nuget/v/dotnetCampus.LatestCSharpFeatures.svg)](https://www.nuget.org/packages/dotnetCampus.LatestCSharpFeatures)|
19-
|dotnetCampus.LatestCSharpFeatures.Source|Source code version of the all-in-one package|[![NuGet](https://img.shields.io/nuget/v/dotnetCampus.LatestCSharpFeatures.Source.svg)](https://www.nuget.org/packages/dotnetCampus.LatestCSharpFeatures.Source)|
20-
|dotnetCampus.IsExternalInit|Supports the use of init syntax|[![NuGet](https://img.shields.io/nuget/v/dotnetCampus.IsExternalInit.svg)](https://www.nuget.org/packages/dotnetCampus.IsExternalInit)|
21-
|dotnetCampus.IsExternalInit.Source|Source code version that supports the use of init syntax|[![NuGet](https://img.shields.io/nuget/v/dotnetCampus.IsExternalInit.Source.svg)](https://www.nuget.org/packages/dotnetCampus.IsExternalInit.Source)|
22-
|dotnetCampus.Nullable|Supports the use of rich nullable features|[![NuGet](https://img.shields.io/nuget/v/dotnetCampus.Nullable.svg)](https://www.nuget.org/packages/dotnetCampus.Nullable)|
23-
|dotnetCampus.Nullable.Source|Source code version that supports the use of rich nullable features|[![NuGet](https://img.shields.io/nuget/v/dotnetCampus.Nullable.Source.svg)](https://www.nuget.org/packages/dotnetCampus.Nullable.Source)|
24-
|dotnetCampus.Required|Adds support for the required syntax*|[![NuGet](https://img.shields.io/nuget/v/dotnetCampus.Required.svg)](https://www.nuget.org/packages/dotnetCampus.Required)|
25-
|dotnetCampus.Required.Source|Source code version that adds support for the required syntax*|[![NuGet](https://img.shields.io/nuget/v/dotnetCampus.Required.Source.svg)](https://www.nuget.org/packages/dotnetCampus.Required.Source)|
26-
27-
\* For an introduction to the required syntax, you can refer to this [description](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/required)【7†source】【9†source】.
11+
This open-source project provides a NuGet package, dotnetCampus.LatestCSharpFeatures, which allows you to use the latest C# language features in older versions of .NET, including the old .NET Framework, .NET Standard, and older versions of .NET Core App and .NET.
2812

2913
## How to Use
3014

31-
For both the all-in-one package and the single-feature packages, we provide two versions. Packages without the .Source suffix will generate a dll, so all projects that reference this project can use these new features. Packages with the .Source suffix are only effective for the project where the package is installed, and there are no additional dlls in the final generated project.
15+
Simply install the dotnetCampus.LatestCSharpFeatures NuGet package.
3216

33-
If you want the .Source package to be effective for other projects that reference this project, you can add a conditional compilation symbol in the csproj file:
17+
If you want these new language features to also be effective for other projects that reference this project, you can add a conditional compilation symbol in the csproj file:
3418

3519
```xml
36-
<!-- By default, installing packages with a .Source suffix imports the new C# features into the current project as internal.
37-
By using this conditional compilation symbol, these types can be set as public, allowing other projects referencing this project to also use these new features. -->
20+
<!-- By default, dotnetCampus.LatestCSharpFeatures introduces C# new features as internal modifiers into the current project.
21+
Using this conditional compilation symbol, you can set these types as public, so that other projects referencing this project can also use these new features. -->
3822
<DefineConstants>$(DefineConstants);USE_PUBLIC_LATEST_CSHARP_FEATURES</DefineConstants>
3923
```
4024

4125
## Feedback and Contributions
4226

43-
We welcome feedback and contributions from all users. If you encounter any problems during use, or have any suggestions for improvement, you can submit them via GitHub Issues.
27+
We welcome feedback and contributions from all users. If you encounter any problems during use, or have any suggestions for improvements, you can submit them via GitHub Issues.
4428

45-
If you wish to participate in the development of the project, you are very welcome! You can Fork this repository and then submit a Pull Request.
29+
If you wish to participate in the development of the project, you are also very welcome! You can Fork this repository and then submit a Pull Request.
4630

4731
Thank you for your support and help with dotnetCampus.LatestCSharpFeatures!

build/Version.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<Project>
22
<PropertyGroup>
3-
<Version>11.0.0</Version>
3+
<Version>12.0.0-alpha01</Version>
44
</PropertyGroup>
5-
</Project>
5+
</Project>

docs/README.jp.md

Lines changed: 0 additions & 47 deletions
This file was deleted.

docs/README.zh-CHS.md

Lines changed: 15 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,29 @@
1-
# Latest CSharp Features
1+
# Latest CSharp Features - 最新 C# 语言特性
22

3-
| Language |
4-
| --- |
3+
| Language |
4+
| ---------------------------------- |
55
| [简体中文](/docs/README.zh-CHS.md) |
66
| [繁體中文](/docs/README.zh-CHT.md) |
7-
| [English](/README.md) |
8-
| [日本語](/docs/README.jp.md) |
7+
| [English](/README.md) |
98

10-
此开源项目提供一系列 NuGet 包,让您可以在旧版本的 .NET(包括旧的 .NET Framework、.NET Standard,以及旧的 .NET Core App、.NET)中,使用最新的 C# 语言特性。
9+
[![NuGet](https://img.shields.io/nuget/v/dotnetCampus.LatestCSharpFeatures.svg)](https://www.nuget.org/packages/dotnetCampus.LatestCSharpFeatures)
1110

12-
## NuGet 包
13-
14-
我们目前提供 8 个 NuGet 包,您可以根据需要选择安装。
15-
16-
|包名|功能|链接|
17-
|---|---|---|
18-
|dotnetCampus.LatestCSharpFeatures|全功能包,包含所有 C# 新功能|[![NuGet](https://img.shields.io/nuget/v/dotnetCampus.LatestCSharpFeatures.svg)](https://www.nuget.org/packages/dotnetCampus.LatestCSharpFeatures)|
19-
|dotnetCampus.LatestCSharpFeatures.Source|全功能包的源代码版本|[![NuGet](https://img.shields.io/nuget/v/dotnetCampus.LatestCSharpFeatures.Source.svg)](https://www.nuget.org/packages/dotnetCampus.LatestCSharpFeatures.Source)|
20-
|dotnetCampus.IsExternalInit|支持使用 init 语法|[![NuGet](https://img.shields.io/nuget/v/dotnetCampus.IsExternalInit.svg)](https://www.nuget.org/packages/dotnetCampus.IsExternalInit)|
21-
|dotnetCampus.IsExternalInit.Source|支持使用 init 语法的源代码版本|[![NuGet](https://img.shields.io/nuget/v/dotnetCampus.IsExternalInit.Source.svg)](https://www.nuget.org/packages/dotnetCampus.IsExternalInit.Source)|
22-
|dotnetCampus.Nullable|支持使用丰富的可空支持|[![NuGet](https://img.shields.io/nuget/v/dotnetCampus.Nullable.svg)](https://www.nuget.org/packages/dotnetCampus.Nullable)|
23-
|dotnetCampus.Nullable.Source|支持使用丰富的可空支持的源代码版本|[![NuGet](https://img.shields.io/nuget/v/dotnetCampus.Nullable.Source.svg)](https://www.nuget.org/packages/dotnetCampus.Nullable.Source)|
24-
|dotnetCampus.Required|增加了 required 语法的支持*|[![NuGet](https://img.shields.io/nuget/v/dotnetCampus.Required.svg)](https://www.nuget.org/packages/dotnetCampus.Required)|
25-
|dotnetCampus.Required.Source|增加了 required 语法支持的源代码版本*|[![NuGet](https://img.shields.io/nuget/v/dotnetCampus.Required.Source.svg)](https://www.nuget.org/packages/dotnetCampus.Required.Source)|
26-
27-
\* 对于 required 语法的介绍,您可以参考这里的[说明](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/required)【7†source】【9†source】。
11+
此开源项目提供一个 NuGet 包 dotnetCampus.LatestCSharpFeatures,让您可以在旧版本的 .NET(包括旧的 .NET Framework、.NET Standard,以及旧的 .NET Core App、.NET)中,使用最新的 C# 语言特性。
2812

2913
## 使用方法
3014

31-
无论是全功能包还是单一功能包,我们都提供了两种版本。不带 .Source 后缀的包会生成一个 dll,这样所有引用了这个项目的项目都能使用到这些新功能。而带有 .Source 后缀的包则只对安装此包的项目有效,最终生成的项目中没有额外的 dll。
15+
直接安装 dotnetCampus.LatestCSharpFeatures NuGet 包即可。
16+
17+
```xml
18+
<!-- 由于 dotnetCampus.LatestCSharpFeatures 只含源生成器,因此不会引入任何运行时依赖项。
19+
我们可以将其设置为 PrivateAssets="all",以避免将其传递给其他项目。 -->
20+
<PackageReference Include="dotnetCampus.LatestCSharpFeatures" Version="12.0.0" PrivateAssets="all" />
21+
```
3222

33-
如果您希望 .Source 包对其他引用了此项目的项目也生效,可以在 csproj 文件中增加一个条件编译符:
23+
如果你希望这些新语言特性对其他引用了此项目的项目也生效,可以在 csproj 文件中增加一个条件编译符:
3424

3525
```xml
36-
<!-- 默认情况下,安装 .Source 后缀的包会将 C# 新特性以 internal 修饰符引入当前项目。
26+
<!-- 默认情况下,dotnetCampus.LatestCSharpFeatures 会将 C# 新特性以 internal 修饰符引入当前项目。
3727
使用此条件编译符,可以将这些类型设为 public,使得引用此项目的其他项目也能使用这些新特性。 -->
3828
<DefineConstants>$(DefineConstants);USE_PUBLIC_LATEST_CSHARP_FEATURES</DefineConstants>
3929
```

docs/README.zh-CHT.md

Lines changed: 13 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,31 @@
1-
# 最新的 CSharp 特性
1+
# Latest CSharp Features 最新的 C# 特性
22

3-
| Language |
4-
| --- |
3+
| Language |
4+
| ---------------------------------- |
55
| [简体中文](/docs/README.zh-CHS.md) |
66
| [繁體中文](/docs/README.zh-CHT.md) |
7-
| [English](/README.md) |
8-
| [日本語](/docs/README.jp.md) |
7+
| [English](/README.md) |
98

10-
此開源項目提供一系列 NuGet 包,讓您可以在舊版本的 .NET(包括舊的 .NET Framework、.NET Standard,以及舊的 .NET Core App、.NET)中,使用最新的 C# 語言特性。
9+
[![NuGet](https://img.shields.io/nuget/v/dotnetCampus.LatestCSharpFeatures.svg)](https://www.nuget.org/packages/dotnetCampus.LatestCSharpFeatures)
1110

12-
## NuGet 包
13-
14-
我們目前提供 8 個 NuGet 包,您可以根據需要選擇安裝。
15-
16-
|包名|功能|連結|
17-
|---|---|---|
18-
|dotnetCampus.LatestCSharpFeatures|全功能包,包含所有 C# 新功能|[![NuGet](https://img.shields.io/nuget/v/dotnetCampus.LatestCSharpFeatures.svg)](https://www.nuget.org/packages/dotnetCampus.LatestCSharpFeatures)|
19-
|dotnetCampus.LatestCSharpFeatures.Source|全功能包的源碼版本|[![NuGet](https://img.shields.io/nuget/v/dotnetCampus.LatestCSharpFeatures.Source.svg)](https://www.nuget.org/packages/dotnetCampus.LatestCSharpFeatures.Source)|
20-
|dotnetCampus.IsExternalInit|支援使用 init 語法|[![NuGet](https://img.shields.io/nuget/v/dotnetCampus.IsExternalInit.svg)](https://www.nuget.org/packages/dotnetCampus.IsExternalInit)|
21-
|dotnetCampus.IsExternalInit.Source|支援使用 init 語法的源碼版本|[![NuGet](https://img.shields.io/nuget/v/dotnetCampus.IsExternalInit.Source.svg)](https://www.nuget.org/packages/dotnetCampus.IsExternalInit.Source)|
22-
|dotnetCampus.Nullable|支援使用豐富的可空支援|[![NuGet](https://img.shields.io/nuget/v/dotnetCampus.Nullable.svg)](https://www.nuget.org/packages/dotnetCampus.Nullable)|
23-
|dotnetCampus.Nullable.Source|支援使用豐富的可空支援的源碼版本|[![NuGet](https://img.shields.io/nuget/v/dotnetCampus.Nullable.Source.svg)](https://www.nuget.org/packages/dotnetCampus.Nullable.Source)|
24-
|dotnetCampus.Required|增加了 required 語法的支援*|[![NuGet](https://img.shields.io/nuget/v/dotnetCampus.Required.svg)](https://www.nuget.org/packages/dotnetCampus.Required)|
25-
|dotnetCampus.Required.Source|增加了 required 語法支援的源碼版本*|[![NuGet](https://img.shields.io/nuget/v/dotnetCampus.Required.Source.svg)](https://www.nuget.org/packages/dotnetCampus.Required.Source)|
26-
27-
\* 對於 required 語法的介紹,您可以參考這裡的[說明](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/required)【7†source】【9†source】。
11+
此開源項目提供一個 NuGet 包 dotnetCampus.LatestCSharpFeatures,讓您可以在舊版本的 .NET(包括舊的 .NET Framework、.NET Standard,以及舊的 .NET Core App、.NET)中,使用最新的 C# 語言特性。
2812

2913
## 使用方法
3014

31-
無論是全功能包還是單一功能包,我們都提供了兩種版本。不帶 .Source 後綴的包會生成一個 dll,這樣所有引用了這個項目的項目都能使用到這些新功能。而帶有 .Source 後綴的包則只對安裝此包的項目有效,最終生成的項目中沒有額外的 dll
15+
直接安裝 dotnetCampus.LatestCSharpFeatures NuGet 包即可
3216

33-
如果您希望 .Source 包對其他引用了此項目的項目也生效,可以在 csproj 文件中增加一個條件編譯符:
17+
如果您希望這些新語言特性對其他引用了此項目的項目也生效,可以在 csproj 文件中增加一個條件編譯符:
3418

3519
```xml
36-
<!-- 預設情況下,安裝 .Source 後綴的包會將 C# 新特性以 internal 修飾符引入當前項目
37-
使用此條件編譯符,可以將這些類型設為 public,使得引用此項目的其他項目也能使用這些新特性-->
20+
<!-- 由於 dotnetCampus.LatestCSharpFeatures 只含源生成器,因此不會引入任何運行時依賴項
21+
我們可以將其設置為 PrivateAssets="all",以避免將其傳遞給其他項目-->
3822
<DefineConstants>$(DefineConstants);USE_PUBLIC_LATEST_CSHARP_FEATURES</DefineConstants>
3923
```
4024

4125
## 反饋與貢獻
4226

43-
我們歡迎所有用戶的反饋和貢獻。如果你在使用過程中發現任何問題,或者有任何改進建議,都可以通過 GitHub Issues 提交。
27+
我們歡迎所有用戶的反饋和貢獻。如果您在使用過程中發現任何問題,或者有任何改進建議,都可以通過 GitHub Issues 提交。
4428

45-
如果你希望參與到項目的開發中,也非常歡迎!你可以 Fork 本倉庫,然後提交 Pull Request。
29+
如果您希望參與到項目的開發中,也非常歡迎!您可以 Fork 本倉庫,然後提交 Pull Request。
4630

47-
感謝你對 dotnetCampus.LatestCSharpFeatures 的支援和幫助
31+
感謝您對 dotnetCampus.LatestCSharpFeatures 的支持和幫助

0 commit comments

Comments
 (0)