mirror of
https://github.com/chylex/.NET-Community-Toolkit.git
synced 2025-01-21 15:46:00 +01:00
41abf66445
- Add default Git attributes. - Update Git ignores to latest. - Merge duplicate EditorConfig rules. - Format projects to EditorConfig rules. - Fix formatting errors in 'Guard.md' file.
71 lines
3.7 KiB
XML
71 lines
3.7 KiB
XML
<Project Sdk="Microsoft.NET.Sdk">
|
|
|
|
<PropertyGroup>
|
|
<TargetFrameworks>netstandard2.0;netstandard2.1;netcoreapp3.1;net6.0</TargetFrameworks>
|
|
</PropertyGroup>
|
|
|
|
<PropertyGroup>
|
|
<Title>.NET Community Toolkit - High Performance</Title>
|
|
<Description>
|
|
This package includes high performance .NET helpers such as:
|
|
- Memory2D<T> and Span2D<T>: two types providing fast and allocation-free abstraction over 2D memory areas.
|
|
- ArrayPoolBufferWriter<T>: an IBufferWriter<T> implementation using pooled arrays, which also supports IMemoryOwner<T>.
|
|
- MemoryBufferWriter<T>: an IBufferWriter<T>: implementation that can wrap external Memory<T>: instances.
|
|
- MemoryOwner<T>: an IMemoryOwner<T> implementation with an embedded length and a fast Span<T> accessor.
|
|
- SpanOwner<T>: a stack-only type with the ability to rent a buffer of a specified length and getting a Span<T> from it.
|
|
- StringPool: a configurable pool for string instances that be used to minimize allocations when creating multiple strings from char buffers.
|
|
- String, array, Memory<T>, Span<T> extensions and more, all focused on high performance.
|
|
- HashCode<T>: a SIMD-enabled extension of HashCode to quickly process sequences of values.
|
|
- BitHelper: a class with helper methods to perform bit operations on numeric types.
|
|
- ParallelHelper: helpers to work with parallel code in a highly optimized manner.
|
|
- Box<T>: a type mapping boxed value types and exposing some utility and high performance methods.
|
|
- Ref<T>: a stack-only struct that can store a reference to a value of a specified type.
|
|
- NullableRef<T>: a stack-only struct similar to Ref<T>, which also supports nullable references.
|
|
</Description>
|
|
<PackageTags>Parallel;Performance;Unsafe;Span;Memory;String;StringPool;Array;Stream;Buffer;Extensions;Helpers</PackageTags>
|
|
</PropertyGroup>
|
|
|
|
<Choose>
|
|
<When Condition="'$(TargetFramework)' == 'netstandard2.0'">
|
|
|
|
<!-- .NET Standard 2.0 doesn't have the Span<T>, HashCode and ValueTask types -->
|
|
<ItemGroup>
|
|
<PackageReference Include="Microsoft.Bcl.HashCode" Version="1.1.1" />
|
|
<PackageReference Include="System.Memory" Version="4.5.5" />
|
|
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.5.4" />
|
|
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="6.0.0" />
|
|
</ItemGroup>
|
|
</When>
|
|
|
|
<When Condition="'$(TargetFramework)' == 'netstandard2.1'">
|
|
|
|
<!-- .NET Standard 2.1 doesn't have the Unsafe type -->
|
|
<ItemGroup>
|
|
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="6.0.0" />
|
|
</ItemGroup>
|
|
</When>
|
|
|
|
<When Condition="'$(TargetFramework)' == 'net6.0'">
|
|
|
|
<!-- NETSTANDARD2_1_OR_GREATER: includes both .NET Standard 2.1, .NET Core 3.1 and .NET 6.
|
|
Additionally, also enable trimming support on .NET 6. -->
|
|
<PropertyGroup>
|
|
<DefineConstants>NETSTANDARD2_1_OR_GREATER</DefineConstants>
|
|
<EnableTrimAnalyzer>true</EnableTrimAnalyzer>
|
|
<IsTrimmable>true</IsTrimmable>
|
|
</PropertyGroup>
|
|
</When>
|
|
|
|
<When Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
|
|
<PropertyGroup>
|
|
<DefineConstants>NETSTANDARD2_1_OR_GREATER</DefineConstants>
|
|
</PropertyGroup>
|
|
|
|
<!-- .NET Core 3.1 has the Unsafe type, but the version it ships with lacks Unsafe.IsNullRef<T> -->
|
|
<ItemGroup>
|
|
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="6.0.0" />
|
|
</ItemGroup>
|
|
</When>
|
|
</Choose>
|
|
|
|
</Project> |