Skip to content

Commit 1160093

Browse files
author
Petar Petrov
committed
Add netstandard2.0 tf
1 parent 30a91ac commit 1160093

5 files changed

+96
-2
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
### [SortingNetworks](./SortingNetworks.md 'SortingNetworks').[SN](./SortingNetworks-SN.md 'SortingNetworks.SN')
2+
## SN.SortAscending<T>(Span<T>) Method
3+
Sorts the elements in an entire [System.Span<>](https://docs.microsoft.com/en-us/dotnet/api/System.Span-1 'System.Span`1') in ascending order using the [System.IComparable<>](https://docs.microsoft.com/en-us/dotnet/api/System.IComparable-1 'System.IComparable`1') generic
4+
interface implementation of each element of the [System.Span<>](https://docs.microsoft.com/en-us/dotnet/api/System.Span-1 'System.Span`1').
5+
```csharp
6+
public static void SortAscending<T>(Span<T> buffer);
7+
```
8+
#### Type parameters
9+
<a name='SortingNetworks-SN-SortAscending-T-(Span-T-)-T'></a>
10+
`T`
11+
The type of the elements of the span.
12+
13+
#### Parameters
14+
<a name='SortingNetworks-SN-SortAscending-T-(Span-T-)-buffer'></a>
15+
`buffer` [System.Span](https://docs.microsoft.com/en-us/dotnet/api/System.Span 'System.Span')
16+
The one-dimensional, zero-based [System.Span&lt;&gt;](https://docs.microsoft.com/en-us/dotnet/api/System.Span-1 'System.Span`1') to sort.
17+
18+
#### Exceptions
19+
[System.ArgumentOutOfRangeException](https://docs.microsoft.com/en-us/dotnet/api/System.ArgumentOutOfRangeException 'System.ArgumentOutOfRangeException')
20+
span length is not between [MinLength](./SortingNetworks-SN-MinLength.md 'SortingNetworks.SN.MinLength') and [MaxLength](./SortingNetworks-SN-MaxLength.md 'SortingNetworks.SN.MaxLength')
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
### [SortingNetworks](./SortingNetworks.md 'SortingNetworks').[SN](./SortingNetworks-SN.md 'SortingNetworks.SN')
2+
## SN.SortAscending&lt;T&gt;(Span&lt;T&gt;, System.Comparison&lt;T&gt;) Method
3+
Sorts the elements in an [System.Span&lt;&gt;](https://docs.microsoft.com/en-us/dotnet/api/System.Span-1 'System.Span`1') in ascending order using the specified [System.Comparison&lt;&gt;](https://docs.microsoft.com/en-us/dotnet/api/System.Comparison-1 'System.Comparison`1').
4+
```csharp
5+
public static void SortAscending<T>(Span<T> buffer, System.Comparison<T> comparison);
6+
```
7+
#### Type parameters
8+
<a name='SortingNetworks-SN-SortAscending-T-(Span-T-_System-Comparison-T-)-T'></a>
9+
`T`
10+
The type of the elements of the span.
11+
12+
#### Parameters
13+
<a name='SortingNetworks-SN-SortAscending-T-(Span-T-_System-Comparison-T-)-buffer'></a>
14+
`buffer` [System.Span](https://docs.microsoft.com/en-us/dotnet/api/System.Span 'System.Span')
15+
The one-dimensional, zero-based [System.Span&lt;&gt;](https://docs.microsoft.com/en-us/dotnet/api/System.Span-1 'System.Span`1') to sort.
16+
17+
<a name='SortingNetworks-SN-SortAscending-T-(Span-T-_System-Comparison-T-)-comparison'></a>
18+
`comparison` [System.Comparison&lt;](https://docs.microsoft.com/en-us/dotnet/api/System.Comparison-1 'System.Comparison`1')[T](#SortingNetworks-SN-SortAscending-T-(Span-T-_System-Comparison-T-)-T 'SortingNetworks.SN.SortAscending&lt;T&gt;(Span&lt;T&gt;, System.Comparison&lt;T&gt;).T')[&gt;](https://docs.microsoft.com/en-us/dotnet/api/System.Comparison-1 'System.Comparison`1')
19+
The [System.Comparison&lt;&gt;](https://docs.microsoft.com/en-us/dotnet/api/System.Comparison-1 'System.Comparison`1') to use when comparing elements.
20+
21+
#### Exceptions
22+
[System.ArgumentNullException](https://docs.microsoft.com/en-us/dotnet/api/System.ArgumentNullException 'System.ArgumentNullException')
23+
comparison is null
24+
[System.ArgumentOutOfRangeException](https://docs.microsoft.com/en-us/dotnet/api/System.ArgumentOutOfRangeException 'System.ArgumentOutOfRangeException')
25+
span length is not between [MinLength](./SortingNetworks-SN-MinLength.md 'SortingNetworks.SN.MinLength') and [MaxLength](./SortingNetworks-SN-MaxLength.md 'SortingNetworks.SN.MaxLength')
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
### [SortingNetworks](./SortingNetworks.md 'SortingNetworks').[SN](./SortingNetworks-SN.md 'SortingNetworks.SN')
2+
## SN.SortDescending&lt;T&gt;(Span&lt;T&gt;) Method
3+
Sorts the elements in an entire [System.Span&lt;&gt;](https://docs.microsoft.com/en-us/dotnet/api/System.Span-1 'System.Span`1') in descending order using the [System.IComparable&lt;&gt;](https://docs.microsoft.com/en-us/dotnet/api/System.IComparable-1 'System.IComparable`1') generic
4+
interface implementation of each element of the [System.Span&lt;&gt;](https://docs.microsoft.com/en-us/dotnet/api/System.Span-1 'System.Span`1').
5+
```csharp
6+
public static void SortDescending<T>(Span<T> buffer);
7+
```
8+
#### Type parameters
9+
<a name='SortingNetworks-SN-SortDescending-T-(Span-T-)-T'></a>
10+
`T`
11+
The type of the elements of the span.
12+
13+
#### Parameters
14+
<a name='SortingNetworks-SN-SortDescending-T-(Span-T-)-buffer'></a>
15+
`buffer` [System.Span](https://docs.microsoft.com/en-us/dotnet/api/System.Span 'System.Span')
16+
The one-dimensional, zero-based [System.Span&lt;&gt;](https://docs.microsoft.com/en-us/dotnet/api/System.Span-1 'System.Span`1') to sort.
17+
18+
#### Exceptions
19+
[System.ArgumentOutOfRangeException](https://docs.microsoft.com/en-us/dotnet/api/System.ArgumentOutOfRangeException 'System.ArgumentOutOfRangeException')
20+
span length is not between [MinLength](./SortingNetworks-SN-MinLength.md 'SortingNetworks.SN.MinLength') and [MaxLength](./SortingNetworks-SN-MaxLength.md 'SortingNetworks.SN.MaxLength')
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
### [SortingNetworks](./SortingNetworks.md 'SortingNetworks').[SN](./SortingNetworks-SN.md 'SortingNetworks.SN')
2+
## SN.SortDescending&lt;T&gt;(Span&lt;T&gt;, System.Comparison&lt;T&gt;) Method
3+
Sorts the elements in an [System.Span&lt;&gt;](https://docs.microsoft.com/en-us/dotnet/api/System.Span-1 'System.Span`1') in descending order using the specified [System.Comparison&lt;&gt;](https://docs.microsoft.com/en-us/dotnet/api/System.Comparison-1 'System.Comparison`1').
4+
```csharp
5+
public static void SortDescending<T>(Span<T> buffer, System.Comparison<T> comparison);
6+
```
7+
#### Type parameters
8+
<a name='SortingNetworks-SN-SortDescending-T-(Span-T-_System-Comparison-T-)-T'></a>
9+
`T`
10+
The type of the elements of the span.
11+
12+
#### Parameters
13+
<a name='SortingNetworks-SN-SortDescending-T-(Span-T-_System-Comparison-T-)-buffer'></a>
14+
`buffer` [System.Span](https://docs.microsoft.com/en-us/dotnet/api/System.Span 'System.Span')
15+
The one-dimensional, zero-based [System.Span&lt;&gt;](https://docs.microsoft.com/en-us/dotnet/api/System.Span-1 'System.Span`1') to sort.
16+
17+
<a name='SortingNetworks-SN-SortDescending-T-(Span-T-_System-Comparison-T-)-comparison'></a>
18+
`comparison` [System.Comparison&lt;](https://docs.microsoft.com/en-us/dotnet/api/System.Comparison-1 'System.Comparison`1')[T](#SortingNetworks-SN-SortDescending-T-(Span-T-_System-Comparison-T-)-T 'SortingNetworks.SN.SortDescending&lt;T&gt;(Span&lt;T&gt;, System.Comparison&lt;T&gt;).T')[&gt;](https://docs.microsoft.com/en-us/dotnet/api/System.Comparison-1 'System.Comparison`1')
19+
The [System.Comparison&lt;&gt;](https://docs.microsoft.com/en-us/dotnet/api/System.Comparison-1 'System.Comparison`1') to use when comparing elements.
20+
21+
#### Exceptions
22+
[System.ArgumentNullException](https://docs.microsoft.com/en-us/dotnet/api/System.ArgumentNullException 'System.ArgumentNullException')
23+
comparison is null
24+
[System.ArgumentOutOfRangeException](https://docs.microsoft.com/en-us/dotnet/api/System.ArgumentOutOfRangeException 'System.ArgumentOutOfRangeException')
25+
span length is not between [MinLength](./SortingNetworks-SN-MinLength.md 'SortingNetworks.SN.MinLength') and [MaxLength](./SortingNetworks-SN-MaxLength.md 'SortingNetworks.SN.MaxLength')

src/SortingNetworks/SortingNetworks.csproj

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>netstandard1.3;netcoreapp3.1</TargetFrameworks>
4+
<TargetFrameworks>netstandard1.3;netstandard2.1;netcoreapp3.1</TargetFrameworks>
55
<AssemblyName>SortingNetworks</AssemblyName>
66
<RootNamespace>SortingNetworks</RootNamespace>
77
<GenerateDocumentationFile>true</GenerateDocumentationFile>
@@ -29,11 +29,15 @@
2929
</PackageReference>
3030
</ItemGroup>
3131

32-
<ItemGroup Condition="'$(TargetFramework)' != 'netcoreapp3.1'">
32+
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard1.3'">
3333
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="4.7.1" />
3434
<PackageReference Include="System.Memory" Version="4.5.4" />
3535
</ItemGroup>
3636

37+
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.1'">
38+
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="4.7.1" />
39+
</ItemGroup>
40+
3741
<ItemGroup>
3842
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="3.3.0">
3943
<PrivateAssets>all</PrivateAssets>

0 commit comments

Comments
 (0)