Skip to content

Commit 3961cf7

Browse files
committed
Removal of NET 452 & Net 46
1 parent 6465f65 commit 3961cf7

3 files changed

Lines changed: 18 additions & 18 deletions

File tree

source/Handlebars/Collections/ImmutableStack.cs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@
44

55
namespace HandlebarsDotNet.Collections
66
{
7-
#if NET451 || NET452
7+
#if NET451
88
[Serializable]
99
#endif
1010
internal readonly struct ImmutableStack<T>
1111
{
1212
private readonly Node _container;
13-
13+
1414
[MethodImpl(MethodImplOptions.AggressiveInlining)]
1515
private ImmutableStack(T value, Node parent)
1616
:this(Node.Create(value, parent))
1717
{
1818
}
19-
19+
2020
[MethodImpl(MethodImplOptions.AggressiveInlining)]
2121
private ImmutableStack(Node container) => _container = container;
2222

@@ -26,8 +26,8 @@ private ImmutableStack(T value, Node parent)
2626
[MethodImpl(MethodImplOptions.AggressiveInlining)]
2727
public T Peek()
2828
{
29-
return _container == null
30-
? default
29+
return _container == null
30+
? default
3131
: _container.Value;
3232
}
3333

@@ -39,20 +39,20 @@ public ImmutableStack<T> Pop(out T value)
3939
value = default;
4040
return this;
4141
}
42-
42+
4343
value = _container.Value;
4444
var parent = _container.Parent;
4545
_container.Dispose();
4646
return new ImmutableStack<T>(parent);
4747
}
48-
49-
#if NET451 || NET452
48+
49+
#if NET451
5050
[Serializable]
5151
#endif
5252
private sealed class Node : IDisposable
5353
{
5454
private static readonly InternalObjectPool<Node, Policy> Pool = new InternalObjectPool<Node, Policy>(new Policy());
55-
55+
5656
public Node Parent;
5757
public T Value;
5858

@@ -63,9 +63,9 @@ public static Node Create(T value = default, Node parent = null)
6363
item.Parent = parent;
6464
return item;
6565
}
66-
66+
6767
private Node() { }
68-
68+
6969
private struct Policy : IInternalObjectPoolPolicy<Node>
7070
{
7171
public Node Create() => new Node();

source/Handlebars/Handlebars.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<AssemblyName>Handlebars</AssemblyName>
55
<ProjectGuid>9822C7B8-7E51-42BC-9A49-72A10491B202</ProjectGuid>
66
<TargetFrameworks>netstandard1.3;netstandard2.0;netstandard2.1;net6</TargetFrameworks>
7-
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">$(TargetFrameworks);net451;net452;net46</TargetFrameworks>
7+
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">$(TargetFrameworks);net451</TargetFrameworks>
88
<Version>2.0.0</Version>
99
<RootNamespace>HandlebarsDotNet</RootNamespace>
1010
<SignAssembly Condition="'$(ShouldSignAssembly)' == 'true'">true</SignAssembly>
@@ -35,7 +35,7 @@
3535
<None Include="..\..\README.md" Pack="true" PackagePath="\" />
3636
</ItemGroup>
3737

38-
<ItemGroup Condition="'$(TargetFramework)'=='net451' or '$(TargetFramework)'=='net452' or '$(TargetFramework)'=='net46'">
38+
<ItemGroup Condition="'$(TargetFramework)'=='net451'">
3939
<Reference Include="Microsoft.CSharp" />
4040
</ItemGroup>
4141

@@ -46,7 +46,7 @@
4646
<PackageReference Include="System.Diagnostics.Contracts" Version="4.3.0" />
4747
</ItemGroup>
4848

49-
<ItemGroup Condition="'$(TargetFramework)'=='net451' or '$(TargetFramework)'=='net452' or '$(TargetFramework)'=='net46'">
49+
<ItemGroup Condition="'$(TargetFramework)'=='net451'">
5050
<PackageReference Include="System.ValueTuple" Version="4.5.0" />
5151
</ItemGroup>
5252

source/Handlebars/Polyfills/AsyncLocal.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#if NET451 || NET452
1+
#if NET451
22
using System;
33
using System.Runtime.CompilerServices;
44
using System.Runtime.Remoting.Messaging;
@@ -8,12 +8,12 @@ namespace HandlebarsDotNet.Polyfills
88
public sealed class AsyncLocal<T>
99
{
1010
private const string Slot = "__AsyncLocalSlot";
11-
11+
1212
public T Value
1313
{
1414
[MethodImpl(MethodImplOptions.AggressiveInlining)]
15-
get => CallContext.LogicalGetData(Slot) is Container container
16-
? container.Value
15+
get => CallContext.LogicalGetData(Slot) is Container container
16+
? container.Value
1717
: default;
1818

1919
[MethodImpl(MethodImplOptions.AggressiveInlining)]

0 commit comments

Comments
 (0)