Skip to content

Commit 0231cbd

Browse files
authored
updated precompilation to target the TFM's that are locked, adding NET5 made it ship with no ReadOnlyMemorySupport' (#17)
1 parent 410a584 commit 0231cbd

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

src/Elastic.Transport/Components/Connection/HandlerTracking/RequestDataHttpClientFactory.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,11 @@ private HttpMessageHandler CreateHandler(int key, RequestData requestData)
100100
{
101101
if (requestData == null) throw new ArgumentNullException(nameof(requestData));
102102

103-
#if NETSTANDARD2_1
103+
#if !NETSTANDARD2_0 && !NETFRAMEWORK
104104
var entry = _activeHandlers.GetOrAdd(key, (k, r) => _entryFactory(k, r), requestData).Value;
105-
#else
105+
#else
106106
var entry = _activeHandlers.GetOrAdd(key, (k) => _entryFactory(k, requestData)).Value;
107-
#endif
107+
#endif
108108

109109
StartHandlerEntryTimer(entry);
110110

src/Elastic.Transport/Components/Providers/RecyclableMemoryStreamManager-Events.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public EventCounter(string blocks, RecyclableMemoryStreamManager.Events eventsWr
4646
public void WriteMetric(long v) { }
4747
}
4848
#endif
49-
#if !NETSTANDARD2_1
49+
#if NETSTANDARD2_0 || NETFRAMEWORK
5050
internal class PollingCounter : IDisposable
5151
{
5252
// ReSharper disable UnusedParameter.Local
@@ -73,7 +73,7 @@ PollingCounter Create(string name, Func<double> poll, string description) =>
7373
new PollingCounter(name, EventsWriter, poll)
7474
// ReSharper disable once RedundantEmptyObjectOrCollectionInitializer
7575
{
76-
#if NETSTANDARD2_1
76+
#if !NETSTANDARD2_0 && !NETFRAMEWORK
7777
DisplayName = description
7878
#endif
7979
};

src/Elastic.Transport/Requests/Body/PostData.ReadOnlyMemory.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
33
// See the LICENSE file in the project root for more information
44

5-
#if NETSTANDARD2_1
5+
#if !NETSTANDARD2_0 && !NETFRAMEWORK
66
using System;
77
using System.IO;
88
using System.Threading;

src/Elastic.Transport/Requests/Body/PostData.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ protected void FinishStream(Stream writableStream, MemoryStream buffer, ITranspo
118118
/// if <see cref="DisableDirectStreaming"/> or <paramref name="settings"/> request to buffer the data.
119119
/// </summary>
120120
protected async
121-
#if NETSTANDARD2_1
121+
#if !NETSTANDARD2_0 && !NETFRAMEWORK
122122
ValueTask
123123
#else
124124
Task

src/Elastic.Transport/Requests/Body/PostType.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#if NETSTANDARD2_1
1+
#if !NETSTANDARD2_0 && !NETFRAMEWORK
22
using System;
33
#endif
44

@@ -14,7 +14,7 @@ public enum PostType
1414
/// <para>Instantiate using <see cref="PostData.Bytes"/></para>
1515
/// </summary>
1616
ByteArray,
17-
#if NETSTANDARD2_1
17+
#if !NETSTANDARD2_0 && !NETFRAMEWORK
1818
/// <summary>
1919
/// An instance of <see cref="ReadOnlyMemory{T}"/> where T is byte
2020
/// <para>Instantiate using <see cref="PostData.ReadOnlyMemory"/></para>

0 commit comments

Comments
 (0)