Skip to content

Commit a3448eb

Browse files
committed
update net45 to net462
1 parent 88c1227 commit a3448eb

39 files changed

+126
-134
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
strategy:
2121
fail-fast: false
2222
matrix:
23-
version: [net452, netcoreapp2.0, netcoreapp3.1]
23+
version: [net462, netcoreapp2.0, netcoreapp3.1]
2424

2525
steps:
2626
- name: Checkout repository

sdk/Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
</ItemGroup>
55

66
<!-- NetFramework does not support embedded pdb -->
7-
<PropertyGroup Condition="'$(TargetFramework)' == 'net45' or '$(TargetFramework)' == 'net452'">
7+
<PropertyGroup Condition="'$(TargetFramework)' == 'net462'">
88
<DebugType>portable</DebugType>
99
</PropertyGroup>
1010
</Project>

sdk/src/Core/AWSXRayRecorder.Core.csproj

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

33
<PropertyGroup>
4-
<TargetFrameworks>net45;netstandard2.0;netcoreapp3.1</TargetFrameworks>
4+
<TargetFrameworks>net462;netstandard2.0;netcoreapp3.1</TargetFrameworks>
55
<Company>Amazon.com, Inc</Company>
66
<Product>Amazon Web Service X-Ray Recorder</Product>
77
<Copyright>Copyright 2017-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.</Copyright>
@@ -51,14 +51,14 @@
5151
<FrameworkReference Include="Microsoft.AspNetCore.App" />
5252
</ItemGroup>
5353

54-
<ItemGroup Condition="'$(TargetFramework)' != 'net45'">
55-
<Compile Remove="Internal\Context\CallContextContainer.net45.cs" />
56-
<Compile Remove="Internal\Context\HybridContextContainer.net45.cs" />
57-
<Compile Remove="Internal\Utils\AppSettings.net45.cs" />
54+
<ItemGroup Condition="'$(TargetFramework)' != 'net462'">
55+
<Compile Remove="Internal\Context\CallContextContainer.netframework.cs" />
56+
<Compile Remove="Internal\Context\HybridContextContainer.netframework.cs" />
57+
<Compile Remove="Internal\Utils\AppSettings.netframework.cs" />
5858
<Compile Remove="AWSXRayRecorder.cs" />
5959
</ItemGroup>
6060

61-
<ItemGroup Condition="'$(TargetFramework)' == 'net45'">
61+
<ItemGroup Condition="'$(TargetFramework)' == 'net462'">
6262
<Compile Remove="Internal\Context\AsyncLocalContextContainer.netstandard.cs" />
6363
<Compile Remove="Internal\Context\LambdaContextContainer.netstandard.cs" />
6464
<Compile Remove="Internal\Utils\AppSettings.netcore.cs" />
@@ -67,7 +67,7 @@
6767
<Compile Remove="FacadeSegment.cs" />
6868
</ItemGroup>
6969

70-
<ItemGroup Condition=" '$(TargetFramework)' == 'net45'">
70+
<ItemGroup Condition="'$(TargetFramework)' == 'net462'">
7171
<Reference Include="System.Configuration" />
7272
<Reference Include="System.Web" />
7373
<Reference Include="System.Net.Http" />

sdk/src/Core/AWSXRayRecorderImpl.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ namespace Amazon.XRay.Recorder.Core
3737
public abstract class AWSXRayRecorderImpl : IAWSXRayRecorder
3838
{
3939
private static readonly Logger _logger = Logger.GetLogger(typeof(AWSXRayRecorderImpl));
40-
#if NET45
40+
#if NETFRAMEWORK
4141
private static Lazy<AWSXRayRecorder> _lazyDefaultRecorder = new Lazy<AWSXRayRecorder>(() => AWSXRayRecorderBuilder.GetDefaultBuilder().Build());
4242
protected static Lazy<AWSXRayRecorder> LazyDefaultRecorder
4343
{
@@ -151,7 +151,7 @@ public ContextMissingStrategy ContextMissingStrategy
151151
/// <exception cref="ArgumentNullException">The argument has a null value.</exception>
152152
public void BeginSegment(string name, string traceId = null, string parentId = null, SamplingResponse samplingResponse = null, DateTime? timestamp = null)
153153
{
154-
#if !NET45
154+
#if !NETFRAMEWORK
155155
if (AWSXRayRecorder.IsLambda())
156156
{
157157
throw new UnsupportedOperationException("Cannot override Facade Segment. New segment not created.");
@@ -193,7 +193,7 @@ public void BeginSegment(string name, string traceId = null, string parentId = n
193193
/// <exception cref="EntityNotAvailableException">Entity is not available in trace context.</exception>
194194
public void EndSegment(DateTime? timestamp = null)
195195
{
196-
#if !NET45
196+
#if !NETFRAMEWORK
197197
if (AWSXRayRecorder.IsLambda())
198198
{
199199
throw new UnsupportedOperationException("Cannot override Facade Segment. New segment not created.");
@@ -727,7 +727,7 @@ protected void PopulateContexts()
727727
// Prepare XRay section for runtime context
728728
var xrayContext = new ConcurrentDictionary<string, string>();
729729

730-
#if NET45
730+
#if NETFRAMEWORK
731731
xrayContext["sdk"] = "X-Ray for .NET";
732732
#else
733733
xrayContext["sdk"] = "X-Ray for .NET Core";
@@ -743,7 +743,7 @@ protected void PopulateContexts()
743743
}
744744

745745
RuntimeContext["xray"] = xrayContext;
746-
#if NET45
746+
#if NETFRAMEWORK
747747
ServiceContext["runtime"] = ".NET Framework";
748748
#else
749749
ServiceContext["runtime"] = ".NET Core Framework";

sdk/src/Core/AwsXrayRecorderBuilder.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public IReadOnlyList<IPlugin> Plugins
5656
}
5757
}
5858

59-
#if NET45
59+
#if NETFRAMEWORK
6060
/// <summary>
6161
/// Initializes <see cref="AWSXRayRecorderBuilder"/> instance with default settings.
6262
/// </summary>
@@ -67,7 +67,7 @@ public static AWSXRayRecorderBuilder GetDefaultBuilder()
6767
}
6868
#endif
6969

70-
#if NET45
70+
#if NETFRAMEWORK
7171
/// <summary>
7272
/// Reads plugin settings from app settings, and adds new instance of each plugin into the builder.
7373
/// If the plugin settings doesn't exist or the value of the settings is invalid, nothing will be added.

sdk/src/Core/Internal/Context/CallContextContainer.net45.cs renamed to sdk/src/Core/Internal/Context/CallContextContainer.netframework.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//-----------------------------------------------------------------------------
2-
// <copyright file="CallContextContainer.net45.cs" company="Amazon.com">
2+
// <copyright file="CallContextContainer.netframework.cs" company="Amazon.com">
33
// Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
44
//
55
// Licensed under the Apache License, Version 2.0 (the "License").

sdk/src/Core/Internal/Context/DefaultTraceContext.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public static class DefaultTraceContext
2525
/// <returns>default instance of <see cref="ITraceContext"/></returns>
2626
public static ITraceContext GetTraceContext()
2727
{
28-
#if NET45
28+
#if NETFRAMEWORK
2929
return new CallContextContainer();
3030
#else
3131
if (AWSXRayRecorder.IsLambda())

sdk/src/Core/Internal/Context/HybridContextContainer.net45.cs renamed to sdk/src/Core/Internal/Context/HybridContextContainer.netframework.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//-----------------------------------------------------------------------------
2-
// <copyright file="TraceContext.net45.cs" company="Amazon.com">
2+
// <copyright file="TraceContext.netframework.cs" company="Amazon.com">
33
// Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
44
//
55
// Licensed under the Apache License, Version 2.0 (the "License").

sdk/src/Core/Internal/Emitters/UdpSegmentEmitter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ protected virtual void Dispose(bool disposing)
136136
{
137137
if (_udpClient != null)
138138
{
139-
#if NET45
139+
#if NETFRAMEWORK
140140
_udpClient.Close();
141141
#else
142142
_udpClient.Dispose();
File renamed without changes.

0 commit comments

Comments
 (0)