mirror of
https://github.com/oliverbooth/X10D
synced 2024-11-10 00:05:42 +00:00
[ci skip] style: upgrade projects to C# 11
NB: While using a higher C# version with lower framework version is possible, it's generally advised against because C# syntax may map to .NET types not available in older versions such as .NET Standard 2.1. This change does not invite the codebase to upgrade to newer types, but rather take advantage of syntax sugar (such as file-scoped namespaces, when this project was updated to C# 10) that does not effect the compiled result. However, this change does open up the possibilities to add extension methods for the "generic math" interfaces (made possible by static interface members), and these upcoming methods will be targeted to .NET 7 or greater **ONLY**.
This commit is contained in:
parent
3cb459028f
commit
9ee99d72d3
@ -5,7 +5,7 @@ or submit a pull request.
|
|||||||
|
|
||||||
### Pull request guidelines
|
### Pull request guidelines
|
||||||
|
|
||||||
This project uses C# 10.0 language features where feasible, and adheres to StyleCop rules with some minor adjustments.
|
This project uses C# 11.0 language features where feasible, and adheres to StyleCop rules with some minor adjustments.
|
||||||
There is an `.editorconfig` included in this repository. For quick and painless pull requests, ensure that the analyzer does not
|
There is an `.editorconfig` included in this repository. For quick and painless pull requests, ensure that the analyzer does not
|
||||||
throw warnings.
|
throw warnings.
|
||||||
|
|
||||||
@ -13,7 +13,7 @@ throw warnings.
|
|||||||
|
|
||||||
Below are a few pointers to which you may refer, but keep in mind this is not an exhaustive list:
|
Below are a few pointers to which you may refer, but keep in mind this is not an exhaustive list:
|
||||||
|
|
||||||
- Use C# 10.0 features where possible
|
- Use C# 11.0 features where possible
|
||||||
- Try to ensure code is CLS-compliant. Where this is not possible, decorate methods with `CLSCompliantAttribute` and pass `false`
|
- Try to ensure code is CLS-compliant. Where this is not possible, decorate methods with `CLSCompliantAttribute` and pass `false`
|
||||||
- Follow all .NET guidelines and coding conventions.
|
- Follow all .NET guidelines and coding conventions.
|
||||||
See https://docs.microsoft.com/en-us/dotnet/csharp/fundamentals/coding-style/coding-conventions
|
See https://docs.microsoft.com/en-us/dotnet/csharp/fundamentals/coding-style/coding-conventions
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>net7.0;net6.0;netstandard2.1</TargetFrameworks>
|
<TargetFrameworks>net7.0;net6.0;netstandard2.1</TargetFrameworks>
|
||||||
<LangVersion>10.0</LangVersion>
|
<LangVersion>11.0</LangVersion>
|
||||||
<Optimize>true</Optimize>
|
<Optimize>true</Optimize>
|
||||||
<ImplicitUsings>true</ImplicitUsings>
|
<ImplicitUsings>true</ImplicitUsings>
|
||||||
<Authors>Oliver Booth</Authors>
|
<Authors>Oliver Booth</Authors>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>net7.0;net6.0;netstandard2.1</TargetFrameworks>
|
<TargetFrameworks>net7.0;net6.0;netstandard2.1</TargetFrameworks>
|
||||||
<LangVersion>10.0</LangVersion>
|
<LangVersion>11.0</LangVersion>
|
||||||
<Optimize>true</Optimize>
|
<Optimize>true</Optimize>
|
||||||
<ImplicitUsings>true</ImplicitUsings>
|
<ImplicitUsings>true</ImplicitUsings>
|
||||||
<Authors>Oliver Booth</Authors>
|
<Authors>Oliver Booth</Authors>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netstandard2.0</TargetFramework>
|
<TargetFramework>netstandard2.0</TargetFramework>
|
||||||
<LangVersion>10.0</LangVersion>
|
<LangVersion>11.0</LangVersion>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
|
<LangVersion>11.0</LangVersion>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>net7.0;net6.0</TargetFrameworks>
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
<LangVersion>10.0</LangVersion>
|
<LangVersion>11.0</LangVersion>
|
||||||
<IsPackable>false</IsPackable>
|
<IsPackable>false</IsPackable>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<ImplicitUsings>true</ImplicitUsings>
|
<ImplicitUsings>true</ImplicitUsings>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netstandard2.1</TargetFramework>
|
<TargetFramework>netstandard2.1</TargetFramework>
|
||||||
<LangVersion>10.0</LangVersion>
|
<LangVersion>11.0</LangVersion>
|
||||||
<Optimize>true</Optimize>
|
<Optimize>true</Optimize>
|
||||||
<ImplicitUsings>true</ImplicitUsings>
|
<ImplicitUsings>true</ImplicitUsings>
|
||||||
<Authors>Oliver Booth</Authors>
|
<Authors>Oliver Booth</Authors>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>net7.0;net6.0;netstandard2.1</TargetFrameworks>
|
<TargetFrameworks>net7.0;net6.0;netstandard2.1</TargetFrameworks>
|
||||||
<LangVersion>10.0</LangVersion>
|
<LangVersion>11.0</LangVersion>
|
||||||
<Optimize>true</Optimize>
|
<Optimize>true</Optimize>
|
||||||
<ImplicitUsings>true</ImplicitUsings>
|
<ImplicitUsings>true</ImplicitUsings>
|
||||||
<Authors>Oliver Booth</Authors>
|
<Authors>Oliver Booth</Authors>
|
||||||
|
Loading…
Reference in New Issue
Block a user