Skip to content

Commit 68d1ae0

Browse files
committed
Remove unused TypeExtensions methods
Move DictionaryExtensions to the correct location
1 parent d2aaaf3 commit 68d1ae0

File tree

2 files changed

+3
-15
lines changed

2 files changed

+3
-15
lines changed

projects/RabbitMQ.Client/FrameworkExtension/DictionaryExtension.cs renamed to projects/RabbitMQ.Client/DictionaryExtension.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,17 @@
2929
// Copyright (c) 2007-2024 Broadcom. All Rights Reserved.
3030
//---------------------------------------------------------------------------
3131

32+
#if NETSTANDARD
3233
using System.Collections.Generic;
3334

34-
namespace RabbitMQ
35+
namespace RabbitMQ.Client
3536
{
36-
#if NETSTANDARD
3737
internal static class DictionaryExtension
3838
{
3939
public static bool Remove<TKey, TValue>(this IDictionary<TKey, TValue> dictionary, TKey key, out TValue value)
4040
{
4141
return dictionary.TryGetValue(key, out value) && dictionary.Remove(key);
4242
}
4343
}
44-
#endif
4544
}
45+
#endif

projects/RabbitMQ.Client/TypeExtensions.cs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,6 @@ public static ref byte GetStart(this Span<byte> span)
5555
return ref MemoryMarshal.GetReference(span);
5656
}
5757

58-
[MethodImpl(MethodImplOptions.AggressiveInlining)]
59-
public static ref byte GetOffset(this ReadOnlySpan<byte> span, int offset)
60-
{
61-
return ref span.GetStart().GetOffset(offset);
62-
}
63-
6458
[MethodImpl(MethodImplOptions.AggressiveInlining)]
6559
public static ref byte GetOffset(this Span<byte> span, int offset)
6660
{
@@ -90,11 +84,5 @@ public static byte ToByte(this ref bool source)
9084
{
9185
return Unsafe.As<bool, byte>(ref source);
9286
}
93-
94-
[MethodImpl(MethodImplOptions.AggressiveInlining)]
95-
public static bool ToBool(this ref byte source)
96-
{
97-
return Unsafe.As<byte, bool>(ref source);
98-
}
9987
}
10088
}

0 commit comments

Comments
 (0)