-
Notifications
You must be signed in to change notification settings - Fork 387
Expand file tree
/
Copy pathCommunityToolkit.HighPerformance.csproj
More file actions
62 lines (54 loc) · 3.34 KB
/
CommunityToolkit.HighPerformance.csproj
File metadata and controls
62 lines (54 loc) · 3.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.0;netstandard2.1;net8.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="6.0.0" />
<PackageReference Include="System.Memory" Version="4.6.0" />
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.6.0" />
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="6.1.0" />
</ItemGroup>
<!-- On .NET Standard 2.0, the unit test project also needs access to internals -->
<ItemGroup>
<InternalsVisibleTo Include="CommunityToolkit.HighPerformance.UnitTests, PublicKey=$(AssemblySignPublicKey)" />
</ItemGroup>
</When>
<!-- .NET Standard 2.1 doesn't have the Unsafe type -->
<When Condition="'$(TargetFramework)' == 'netstandard2.1'">
<ItemGroup>
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="6.1.0" />
</ItemGroup>
</When>
</Choose>
<!-- Necessary polyfills -->
<PropertyGroup>
<PolySharpIncludeGeneratedTypes>
System.Diagnostics.CodeAnalysis.NotNullAttribute;
System.Diagnostics.CodeAnalysis.NotNullWhenAttribute;
System.Runtime.CompilerServices.SkipLocalsInitAttribute;
</PolySharpIncludeGeneratedTypes>
</PropertyGroup>
</Project>